Patchwork [3/3] ofono: Enable test scripts by default

login
register
mail settings
Submitter Jukka Rissanen
Date July 26, 2013, 12:35 p.m.
Message ID <1374842117-24504-4-git-send-email-jukka.rissanen@linux.intel.com>
Download mbox | patch
Permalink /patch/54591/
State Accepted
Commit 82877a966513ab142543bdba55c48ec442934e9d
Headers show

Comments

Jukka Rissanen - July 26, 2013, 12:35 p.m.
oFono test scripts are very useful so enable those by default.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
---
 meta/recipes-connectivity/ofono/ofono.inc     | 3 ++-
 meta/recipes-connectivity/ofono/ofono_1.12.bb | 3 ---
 2 files changed, 2 insertions(+), 4 deletions(-)
Saul Wold - July 26, 2013, 6:52 p.m.
On 07/26/2013 05:35 AM, Jukka Rissanen wrote:
> oFono test scripts are very useful so enable those by default.
>
> Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
> ---
>   meta/recipes-connectivity/ofono/ofono.inc     | 3 ++-
>   meta/recipes-connectivity/ofono/ofono_1.12.bb | 3 ---
>   2 files changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/meta/recipes-connectivity/ofono/ofono.inc b/meta/recipes-connectivity/ofono/ofono.inc
> index d825496..c5bd4d0 100644
> --- a/meta/recipes-connectivity/ofono/ofono.inc
> +++ b/meta/recipes-connectivity/ofono/ofono.inc
> @@ -15,6 +15,7 @@ INITSCRIPT_PARAMS = "defaults 22"
>   EXTRA_OECONF += "\
>       ${@base_contains('DISTRO_FEATURES', 'systemd', '--with-systemdunitdir=${systemd_unitdir}/system/', '--with-systemdunitdir=', d)} \
>       ${@base_contains('DISTRO_FEATURES', 'bluetooth','--enable-bluetooth', '--disable-bluetooth', d)} \
> +    --enable-test \
>   "
>   SYSTEMD_SERVICE_${PN} = "ofono.service"
>
> @@ -30,5 +31,5 @@ PACKAGES =+ "${PN}-tests"
>   RDEPENDS_${PN} += "dbus"
>
>   FILES_${PN} += "${base_libdir}/udev ${systemd_unitdir}"
> -FILES_${PN}-tests = "${libdir}/ofono"
> +FILES_${PN}-tests = "${libdir}/${BPN}/test"
I think you should be using the ptest here instead of test and inherit 
ptest, please see the ptest.bbclass.

I realize that this is not new code, but if we are going to changes this 
we should use the new ptest mechanism.

Sau!

>   RDEPENDS_${PN}-tests = "python python-pygobject python-dbus"
> diff --git a/meta/recipes-connectivity/ofono/ofono_1.12.bb b/meta/recipes-connectivity/ofono/ofono_1.12.bb
> index 32c8bc2..ad524a0 100644
> --- a/meta/recipes-connectivity/ofono/ofono_1.12.bb
> +++ b/meta/recipes-connectivity/ofono/ofono_1.12.bb
> @@ -12,7 +12,4 @@ PR = "r2"
>   SRC_URI[md5sum] = "aa8924c0e8de3ec7ac5e41fe7df4cb99"
>   SRC_URI[sha256sum] = "733b75bfd1b2a1925b6de532989c496b8ae17a746691120ef64cceb00b3ef751"
>
> -EXTRA_OECONF += "\
> -    --enable-test \
> -"
>   CFLAGS_append_libc-uclibc = " -D_GNU_SOURCE"
>
Jukka Rissanen - July 29, 2013, 6:51 a.m.
Hi Saul,

On 26.07.2013 21:52, Saul Wold wrote:
> On 07/26/2013 05:35 AM, Jukka Rissanen wrote:
>> oFono test scripts are very useful so enable those by default.
>>
>> Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
>> ---
>>   meta/recipes-connectivity/ofono/ofono.inc     | 3 ++-
>>   meta/recipes-connectivity/ofono/ofono_1.12.bb | 3 ---
>>   2 files changed, 2 insertions(+), 4 deletions(-)
>>
>> diff --git a/meta/recipes-connectivity/ofono/ofono.inc
>> b/meta/recipes-connectivity/ofono/ofono.inc
>> index d825496..c5bd4d0 100644
>> --- a/meta/recipes-connectivity/ofono/ofono.inc
>> +++ b/meta/recipes-connectivity/ofono/ofono.inc
>> @@ -15,6 +15,7 @@ INITSCRIPT_PARAMS = "defaults 22"
>>   EXTRA_OECONF += "\
>>       ${@base_contains('DISTRO_FEATURES', 'systemd',
>> '--with-systemdunitdir=${systemd_unitdir}/system/',
>> '--with-systemdunitdir=', d)} \
>>       ${@base_contains('DISTRO_FEATURES',
>> 'bluetooth','--enable-bluetooth', '--disable-bluetooth', d)} \
>> +    --enable-test \
>>   "
>>   SYSTEMD_SERVICE_${PN} = "ofono.service"
>>
>> @@ -30,5 +31,5 @@ PACKAGES =+ "${PN}-tests"
>>   RDEPENDS_${PN} += "dbus"
>>
>>   FILES_${PN} += "${base_libdir}/udev ${systemd_unitdir}"
>> -FILES_${PN}-tests = "${libdir}/ofono"
>> +FILES_${PN}-tests = "${libdir}/${BPN}/test"
> I think you should be using the ptest here instead of test and inherit
> ptest, please see the ptest.bbclass.
>
> I realize that this is not new code, but if we are going to changes this
> we should use the new ptest mechanism.
>
> Sau!
>

If I am reading https://wiki.yoctoproject.org/wiki/Ptest correctly, the 
ptest if for running the package test suite. Unfortunately the 
ofono-tests package is not for that purpose, it is just a bunch of 
useful python scripts for setting up cellular modem, context and 
monitoring ofono signals etc.
Similar scripts are also found in connman and neard packages.


Cheers,
Jukka
Ross Burton - July 29, 2013, 8:26 a.m.
On 29 July 2013 07:51, Jukka Rissanen <jukka.rissanen@linux.intel.com> wrote:
>> I think you should be using the ptest here instead of test and inherit
>> ptest, please see the ptest.bbclass.
>>
>> I realize that this is not new code, but if we are going to changes this
>> we should use the new ptest mechanism.
>
> If I am reading https://wiki.yoctoproject.org/wiki/Ptest correctly, the
> ptest if for running the package test suite. Unfortunately the ofono-tests
> package is not for that purpose, it is just a bunch of useful python scripts
> for setting up cellular modem, context and monitoring ofono signals etc.
> Similar scripts are also found in connman and neard packages.

You're right Jukka, whilst ptest is something that everyone should be
considering it's for test suites that typically run at "make check",
these are not that.

Ross

Patch

diff --git a/meta/recipes-connectivity/ofono/ofono.inc b/meta/recipes-connectivity/ofono/ofono.inc
index d825496..c5bd4d0 100644
--- a/meta/recipes-connectivity/ofono/ofono.inc
+++ b/meta/recipes-connectivity/ofono/ofono.inc
@@ -15,6 +15,7 @@  INITSCRIPT_PARAMS = "defaults 22"
 EXTRA_OECONF += "\
     ${@base_contains('DISTRO_FEATURES', 'systemd', '--with-systemdunitdir=${systemd_unitdir}/system/', '--with-systemdunitdir=', d)} \
     ${@base_contains('DISTRO_FEATURES', 'bluetooth','--enable-bluetooth', '--disable-bluetooth', d)} \
+    --enable-test \
 "
 SYSTEMD_SERVICE_${PN} = "ofono.service"
 
@@ -30,5 +31,5 @@  PACKAGES =+ "${PN}-tests"
 RDEPENDS_${PN} += "dbus"
 
 FILES_${PN} += "${base_libdir}/udev ${systemd_unitdir}"
-FILES_${PN}-tests = "${libdir}/ofono"
+FILES_${PN}-tests = "${libdir}/${BPN}/test"
 RDEPENDS_${PN}-tests = "python python-pygobject python-dbus"
diff --git a/meta/recipes-connectivity/ofono/ofono_1.12.bb b/meta/recipes-connectivity/ofono/ofono_1.12.bb
index 32c8bc2..ad524a0 100644
--- a/meta/recipes-connectivity/ofono/ofono_1.12.bb
+++ b/meta/recipes-connectivity/ofono/ofono_1.12.bb
@@ -12,7 +12,4 @@  PR = "r2"
 SRC_URI[md5sum] = "aa8924c0e8de3ec7ac5e41fe7df4cb99"
 SRC_URI[sha256sum] = "733b75bfd1b2a1925b6de532989c496b8ae17a746691120ef64cceb00b3ef751"
 
-EXTRA_OECONF += "\
-    --enable-test \
-"
 CFLAGS_append_libc-uclibc = " -D_GNU_SOURCE"