Patchwork [1/1] ethtool: fix ptest execution failure

login
register
mail settings
Submitter Chong.Lu@windriver.com
Date May 26, 2014, 9:21 a.m.
Message ID <b381184d550cfdb6f044e9fde7660a69877708cc.1401096040.git.Chong.Lu@windriver.com>
Download mbox | patch
Permalink /patch/72693/
State New
Headers show

Comments

Chong.Lu@windriver.com - May 26, 2014, 9:21 a.m.
Modify ptest suite to make it enabled on new version.

Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
---
 meta/recipes-extended/ethtool/ethtool/run-ptest |  2 +-
 meta/recipes-extended/ethtool/ethtool_3.14.bb   | 16 ++++++++++------
 2 files changed, 11 insertions(+), 7 deletions(-)
Tudor Florea - May 26, 2014, 4:02 p.m.
> -----Original Message-----
> From: openembedded-core-bounces@lists.openembedded.org
> [mailto:openembedded-core-bounces@lists.openembedded.org] On Behalf
> Of Chong Lu
> Sent: Monday, May 26, 2014 12:22
> To: openembedded-core@lists.openembedded.org
> Subject: [OE-core] [PATCH 1/1] ethtool: fix ptest execution failure
> 
> Modify ptest suite to make it enabled on new version.
> 
> Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
> ---
>  meta/recipes-extended/ethtool/ethtool/run-ptest |  2 +-
>  meta/recipes-extended/ethtool/ethtool_3.14.bb   | 16 ++++++++++------
>  2 files changed, 11 insertions(+), 7 deletions(-)
> 
> diff --git a/meta/recipes-extended/ethtool/ethtool/run-ptest
> b/meta/recipes-extended/ethtool/ethtool/run-ptest
> index 1e245da..a359387 100644
> --- a/meta/recipes-extended/ethtool/ethtool/run-ptest
> +++ b/meta/recipes-extended/ethtool/ethtool/run-ptest
> @@ -1,2 +1,2 @@
>  #!/bin/sh
> -make -k runtest-TESTS
> +make -k check-TESTS
> diff --git a/meta/recipes-extended/ethtool/ethtool_3.14.bb
> b/meta/recipes-extended/ethtool/ethtool_3.14.bb
> index 2a3ca70..9729f65 100644
> --- a/meta/recipes-extended/ethtool/ethtool_3.14.bb
> +++ b/meta/recipes-extended/ethtool/ethtool_3.14.bb
> @@ -13,16 +13,20 @@ SRC_URI[md5sum] =
> "997e20c25c43ad5800f8ae3204455a8a"
>  SRC_URI[sha256sum] =
> "b1a988d6e397bd9d5d73cfd64329f85121936a050174bbfe90f8701fd893a1df"
> 
>  inherit autotools ptest
> -RDEPENDS_${PN}-ptest += "make"
> +RDEPENDS_${PN}-ptest += "make bash gawk"

Isn't possible to avoid bash and gawk dependency here?
Regards,
  Tudor

> 
>  do_compile_ptest() {
>     oe_runmake test-cmdline test-features
>  }
> 
>  do_install_ptest () {
> -   cp ${B}/Makefile                 ${D}${PTEST_PATH}
> -   install ${B}/test-cmdline        ${D}${PTEST_PATH}
> -   install ${B}/test-features       ${D}${PTEST_PATH}
> -   install ${B}/ethtool             ${D}${PTEST_PATH}/ethtool
> -   sed -i 's/^Makefile/_Makefile/'  ${D}${PTEST_PATH}/Makefile
> +   for i in Makefile test-cmdline test-features; do \
> +       install ${B}/$i ${D}${PTEST_PATH}; done
> +   install ${S}/test-driver ${D}${PTEST_PATH}
> +   sed -e 's/^Makefile/_Makefile/' \
> +       -e 's/^test_cmdline_OBJECTS/#test_cmdline_OBJECTS/' \
> +       -e 's/^test_features_OBJECTS/#test_features_OBJECTS/' \
> +       -e 's/^top_srcdir = \(.*\)/top_srcdir = ./' \
> +       -e '/^all:/,+1d' \
> +       -i ${D}${PTEST_PATH}/Makefile
>  }
> --
> 1.8.1.2
> 
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
Chong.Lu@windriver.com - May 27, 2014, 1:33 a.m.
On 05/27/2014 12:02 AM, Tudor Florea wrote:
>
>> -----Original Message-----
>> From: openembedded-core-bounces@lists.openembedded.org
>> [mailto:openembedded-core-bounces@lists.openembedded.org] On Behalf
>> Of Chong Lu
>> Sent: Monday, May 26, 2014 12:22
>> To: openembedded-core@lists.openembedded.org
>> Subject: [OE-core] [PATCH 1/1] ethtool: fix ptest execution failure
>>
>> Modify ptest suite to make it enabled on new version.
>>
>> Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
>> ---
>>   meta/recipes-extended/ethtool/ethtool/run-ptest |  2 +-
>>   meta/recipes-extended/ethtool/ethtool_3.14.bb   | 16 ++++++++++------
>>   2 files changed, 11 insertions(+), 7 deletions(-)
>>
>> diff --git a/meta/recipes-extended/ethtool/ethtool/run-ptest
>> b/meta/recipes-extended/ethtool/ethtool/run-ptest
>> index 1e245da..a359387 100644
>> --- a/meta/recipes-extended/ethtool/ethtool/run-ptest
>> +++ b/meta/recipes-extended/ethtool/ethtool/run-ptest
>> @@ -1,2 +1,2 @@
>>   #!/bin/sh
>> -make -k runtest-TESTS
>> +make -k check-TESTS
>> diff --git a/meta/recipes-extended/ethtool/ethtool_3.14.bb
>> b/meta/recipes-extended/ethtool/ethtool_3.14.bb
>> index 2a3ca70..9729f65 100644
>> --- a/meta/recipes-extended/ethtool/ethtool_3.14.bb
>> +++ b/meta/recipes-extended/ethtool/ethtool_3.14.bb
>> @@ -13,16 +13,20 @@ SRC_URI[md5sum] =
>> "997e20c25c43ad5800f8ae3204455a8a"
>>   SRC_URI[sha256sum] =
>> "b1a988d6e397bd9d5d73cfd64329f85121936a050174bbfe90f8701fd893a1df"
>>
>>   inherit autotools ptest
>> -RDEPENDS_${PN}-ptest += "make"
>> +RDEPENDS_${PN}-ptest += "make bash gawk"
> Isn't possible to avoid bash and gawk dependency here?
> Regards,
>    Tudor
Ok, it's possible. But it needs to change Makefile more.
I will resend a V2.

Best Regards
Chong
>>   do_compile_ptest() {
>>      oe_runmake test-cmdline test-features
>>   }
>>
>>   do_install_ptest () {
>> -   cp ${B}/Makefile                 ${D}${PTEST_PATH}
>> -   install ${B}/test-cmdline        ${D}${PTEST_PATH}
>> -   install ${B}/test-features       ${D}${PTEST_PATH}
>> -   install ${B}/ethtool             ${D}${PTEST_PATH}/ethtool
>> -   sed -i 's/^Makefile/_Makefile/'  ${D}${PTEST_PATH}/Makefile
>> +   for i in Makefile test-cmdline test-features; do \
>> +       install ${B}/$i ${D}${PTEST_PATH}; done
>> +   install ${S}/test-driver ${D}${PTEST_PATH}
>> +   sed -e 's/^Makefile/_Makefile/' \
>> +       -e 's/^test_cmdline_OBJECTS/#test_cmdline_OBJECTS/' \
>> +       -e 's/^test_features_OBJECTS/#test_features_OBJECTS/' \
>> +       -e 's/^top_srcdir = \(.*\)/top_srcdir = ./' \
>> +       -e '/^all:/,+1d' \
>> +       -i ${D}${PTEST_PATH}/Makefile
>>   }
>> --
>> 1.8.1.2
>>
>> --
>> _______________________________________________
>> Openembedded-core mailing list
>> Openembedded-core@lists.openembedded.org
>> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>

Patch

diff --git a/meta/recipes-extended/ethtool/ethtool/run-ptest b/meta/recipes-extended/ethtool/ethtool/run-ptest
index 1e245da..a359387 100644
--- a/meta/recipes-extended/ethtool/ethtool/run-ptest
+++ b/meta/recipes-extended/ethtool/ethtool/run-ptest
@@ -1,2 +1,2 @@ 
 #!/bin/sh
-make -k runtest-TESTS
+make -k check-TESTS
diff --git a/meta/recipes-extended/ethtool/ethtool_3.14.bb b/meta/recipes-extended/ethtool/ethtool_3.14.bb
index 2a3ca70..9729f65 100644
--- a/meta/recipes-extended/ethtool/ethtool_3.14.bb
+++ b/meta/recipes-extended/ethtool/ethtool_3.14.bb
@@ -13,16 +13,20 @@  SRC_URI[md5sum] = "997e20c25c43ad5800f8ae3204455a8a"
 SRC_URI[sha256sum] = "b1a988d6e397bd9d5d73cfd64329f85121936a050174bbfe90f8701fd893a1df"
 
 inherit autotools ptest
-RDEPENDS_${PN}-ptest += "make"
+RDEPENDS_${PN}-ptest += "make bash gawk"
 
 do_compile_ptest() {
    oe_runmake test-cmdline test-features
 }
 
 do_install_ptest () {
-   cp ${B}/Makefile                 ${D}${PTEST_PATH}
-   install ${B}/test-cmdline        ${D}${PTEST_PATH}
-   install ${B}/test-features       ${D}${PTEST_PATH}
-   install ${B}/ethtool             ${D}${PTEST_PATH}/ethtool
-   sed -i 's/^Makefile/_Makefile/'  ${D}${PTEST_PATH}/Makefile
+   for i in Makefile test-cmdline test-features; do \
+       install ${B}/$i ${D}${PTEST_PATH}; done
+   install ${S}/test-driver ${D}${PTEST_PATH}
+   sed -e 's/^Makefile/_Makefile/' \
+       -e 's/^test_cmdline_OBJECTS/#test_cmdline_OBJECTS/' \
+       -e 's/^test_features_OBJECTS/#test_features_OBJECTS/' \
+       -e 's/^top_srcdir = \(.*\)/top_srcdir = ./' \
+       -e '/^all:/,+1d' \
+       -i ${D}${PTEST_PATH}/Makefile
 }