diffutils/run-ptest: support to run at arbitrary path

Submitted by Hongxu Jia on June 13, 2019, 8:06 a.m. | Patch ID: 162175

Details

Message ID 1560413184-99289-1-git-send-email-hongxu.jia@windriver.com
State Accepted
Commit 0f7ada89ef8ed65eee8ada5e766999af7771c2c8
Headers show

Commit Message

Hongxu Jia June 13, 2019, 8:06 a.m.
1. Run run-ptest at arbitrary path

2. Fix large-subopt.in1 not found
...
|diff: /lib32-diffutils/3.7-r0/build/../diffutils-3.7/tests/large-subopt.in1:
No such file or directory
|diff: /lib32-diffutils/3.7-r0/build/../diffutils-3.7/tests/large-subopt.in2:
No such file or directory
...

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
 meta/recipes-extended/diffutils/diffutils/run-ptest | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/meta/recipes-extended/diffutils/diffutils/run-ptest b/meta/recipes-extended/diffutils/diffutils/run-ptest
index 695c5e8a7b..ad467d9bd0 100644
--- a/meta/recipes-extended/diffutils/diffutils/run-ptest
+++ b/meta/recipes-extended/diffutils/diffutils/run-ptest
@@ -1,3 +1,4 @@ 
 #!/bin/sh
 
-make -C tests check-TESTS
+abs_ptestdir=`echo "$(cd "$(dirname "$0")"; pwd)"`
+make -C $abs_ptestdir/tests check-TESTS abs_top_srcdir="$abs_ptestdir"

Comments

Ross Burton June 13, 2019, 10:07 a.m.
Are you going to fix all of the other recipes?  Very few recipes let
you run the tests from an arbitrary directory, and assume that you're
in the test directory already.

Ross

On Thu, 13 Jun 2019 at 09:08, Hongxu Jia <hongxu.jia@windriver.com> wrote:
>
> 1. Run run-ptest at arbitrary path
>
> 2. Fix large-subopt.in1 not found
> ...
> |diff: /lib32-diffutils/3.7-r0/build/../diffutils-3.7/tests/large-subopt.in1:
> No such file or directory
> |diff: /lib32-diffutils/3.7-r0/build/../diffutils-3.7/tests/large-subopt.in2:
> No such file or directory
> ...
>
> Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
> ---
>  meta/recipes-extended/diffutils/diffutils/run-ptest | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/meta/recipes-extended/diffutils/diffutils/run-ptest b/meta/recipes-extended/diffutils/diffutils/run-ptest
> index 695c5e8a7b..ad467d9bd0 100644
> --- a/meta/recipes-extended/diffutils/diffutils/run-ptest
> +++ b/meta/recipes-extended/diffutils/diffutils/run-ptest
> @@ -1,3 +1,4 @@
>  #!/bin/sh
>
> -make -C tests check-TESTS
> +abs_ptestdir=`echo "$(cd "$(dirname "$0")"; pwd)"`
> +make -C $abs_ptestdir/tests check-TESTS abs_top_srcdir="$abs_ptestdir"
> --
> 2.17.1
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
Hongxu Jia June 13, 2019, 12:35 p.m.
On 6/13/19 6:07 PM, Burton, Ross wrote:
> Are you going to fix all of the other recipes?  Very few recipes let
> you run the tests from an arbitrary directory, and assume that you're
> in the test directory already.

Only focus on this recipe, my original task is to resolve 2. Fix 
large-subopt.in1 not found,

and 1 is my deeper improvement. I know most of ptest require to run in 
specific dir

//Hongxu


> Ross
>
> On Thu, 13 Jun 2019 at 09:08, Hongxu Jia <hongxu.jia@windriver.com> wrote:
>> 1. Run run-ptest at arbitrary path
>>
>> 2. Fix large-subopt.in1 not found
>> ...
>> |diff: /lib32-diffutils/3.7-r0/build/../diffutils-3.7/tests/large-subopt.in1:
>> No such file or directory
>> |diff: /lib32-diffutils/3.7-r0/build/../diffutils-3.7/tests/large-subopt.in2:
>> No such file or directory
>> ...
>>
>> Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
>> ---
>>   meta/recipes-extended/diffutils/diffutils/run-ptest | 3 ++-
>>   1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/meta/recipes-extended/diffutils/diffutils/run-ptest b/meta/recipes-extended/diffutils/diffutils/run-ptest
>> index 695c5e8a7b..ad467d9bd0 100644
>> --- a/meta/recipes-extended/diffutils/diffutils/run-ptest
>> +++ b/meta/recipes-extended/diffutils/diffutils/run-ptest
>> @@ -1,3 +1,4 @@
>>   #!/bin/sh
>>
>> -make -C tests check-TESTS
>> +abs_ptestdir=`echo "$(cd "$(dirname "$0")"; pwd)"`
>> +make -C $abs_ptestdir/tests check-TESTS abs_top_srcdir="$abs_ptestdir"
>> --
>> 2.17.1
>>
>> --
>> _______________________________________________
>> Openembedded-core mailing list
>> Openembedded-core@lists.openembedded.org
>> http://lists.openembedded.org/mailman/listinfo/openembedded-core