Skip to contentSkip to conversation

Build and package dbus-tests - separate recipe

PATCH In review Andrei Gherzan 4 participants 7 messages Aug 17, 2012

lore
Share & tools
lore
#0 lore raw

cover Build and package dbus-tests - separate recipe

While compiling dbus with tests, dbus and dbus-glib are needed. To compile dbus-glib, dbus is needed (obviously). The only solution (to compile dbus with tests) that i found, is to create a new recipe named dbus-tests where to compile dbus with --enable-tests --enable-embedded-tests, skip write to sysroot (noexec) and just package dbus-tests.
I included a wrapper to run all tests.
As discussed on mailing list, tests location is: libdir/BPN

Tested on all qemu machines with dbus 1.4.20 and with the comming 1.6.4

The following changes since commit bddd8300325267253941e7ce656ce2cf86a8a4a4:

apr-util: fix the rules.mk with path to sysroot instead of the workdir of apr (2012-08-17 13:10:08 +0100)

are available in the git repository at:
git://git.yoctoproject.org/poky-contrib ag/dbus-tests
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=ag/dbus-tests

Andrei Gherzan (2):
python-dbus: Native dbus python module needed for dbus tests
dbus-tests: Add separate recipe for building dbus-tests

 meta/recipes-core/dbus/dbus-tests/run_test.sh     |   22 +++++++
 meta/recipes-core/dbus/dbus-tests_1.4.20.bb       |   64 +++++++++++++++++++++
 meta/recipes-devtools/python/python-dbus_1.1.1.bb |    5 +-
 3 files changed, 90 insertions(+), 1 deletions(-)
 create mode 100755 meta/recipes-core/dbus/dbus-tests/run_test.sh
 create mode 100644 meta/recipes-core/dbus/dbus-tests_1.4.20.bb
Signature · 1 line
1.7.5.4
#1 lore raw

PATCH 1/2 python-dbus: Native dbus python module needed for dbus tests

---
 meta/recipes-devtools/python/python-dbus_1.1.1.bb |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
meta/recipes-devtools/python/python-dbus_1.1.1.bb +4 -1
index 51d5bc2..35149a0 100644
@@ -4,7 +4,7 @@ HOMEPAGE = "http://www.freedesktop.org/Software/dbus"
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://COPYING;md5=f5612614133e9a2f2dad527d97554670"
 DEPENDS = "expat dbus dbus-glib virtual/libintl python-pyrex-native"
-PR = "r0"
+PR = "r1"
 
 SRC_URI = "http://dbus.freedesktop.org/releases/dbus-python/dbus-python-${PV}.tar.gz"
 
@@ -23,3 +23,6 @@ export STAGING_INCDIR
 RDEPENDS_${PN} = "python-io python-logging python-stringold python-threading python-xml"
 
 FILES_${PN}-dev += "${libdir}/pkgconfig"
+
+RDEPENDS_${PN}_virtclass-native = "python"
+BBCLASSEXTEND = "native"
Signature · 1 line
1.7.5.4
#2 lore raw

Re: [PATCH 1/2] python-dbus: Native dbus python module needed for dbus tests

Quoted 19 lines · Andrei Gherzan
---
 meta/recipes-devtools/python/python-dbus_1.1.1.bb |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
meta/recipes-devtools/python/python-dbus_1.1.1.bb +1 -1
index 51d5bc2..35149a0 100644
@@ -4,7 +4,7 @@ HOMEPAGE = "http://www.freedesktop.org/Software/dbus"
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://COPYING;md5=f5612614133e9a2f2dad527d97554670"
 DEPENDS = "expat dbus dbus-glib virtual/libintl python-pyrex-native"
-PR = "r0"
+PR = "r1"
 
 SRC_URI = "http://dbus.freedesktop.org/releases/dbus-python/dbus-python-${PV}.tar.gz"
 

meta/recipes-devtools/python/python-dbus_1.1.1.bb export STAGING_INCDIR · line 27

Quoted 5 lines
meta/recipes-devtools/python/python-dbus_1.1.1.bb +2 -0
@@ -23,3 +23,6 @@ export STAGING_INCDIR
 RDEPENDS_${PN} = "python-io python-logging python-stringold python-threading python-xml"
 
 FILES_${PN}-dev += "${libdir}/pkgconfig"
+
+RDEPENDS_${PN}_virtclass-native = "python"

Does RDEPENDS_${PN} work for native recipes? I thought that R* vars are for runtime packages and native builds doesn't provide them imho.

And if they do, why not explicitly ask for python-native, because target python wont help I guess.

Quoted 9 lines
meta/recipes-devtools/python/python-dbus_1.1.1.bb +1 -0
+BBCLASSEXTEND = "native"
Signature · 7 lines
1.7.5.4


_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
#3 lore raw

Re: [PATCH 1/2] python-dbus: Native dbus python module needed for dbus tests

Quoted 32 lines · Martin Jansa

Review

Quoted 6 lines · Andrei Gherzan
---
 meta/recipes-devtools/python/python-dbus_1.1.1.bb |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
(quoted diff) +0 -0

python-dbus_1.1.1.bb

meta/recipes-devtools/python/python-dbus_1.1.1.bb HOMEPAGE = "http://www.freedesktop.org/Software/dbus" · line 9

Quoted 11 lines

index 51d5bc2..35149a0 100644

meta/recipes-devtools/python/python-dbus_1.1.1.bb +1 -1
@@ -4,7 +4,7 @@ HOMEPAGE = "http://www.freedesktop.org/Software/dbus"
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://COPYING;md5=f5612614133e9a2f2dad527d97554670"
 DEPENDS = "expat dbus dbus-glib virtual/libintl python-pyrex-native"
-PR = "r0"
+PR = "r1"
 
 SRC_URI = "

http://dbus.freedesktop.org/releases/dbus-python/dbus-python-${PV}.tar.gz"

meta/recipes-devtools/python/python-dbus_1.1.1.bb export STAGING_INCDIR · line 23

Quoted 3 lines
meta/recipes-devtools/python/python-dbus_1.1.1.bb +0 -0
@@ -23,3 +23,6 @@ export STAGING_INCDIR
 RDEPENDS_${PN} = "python-io python-logging python-stringold

python-threading python-xml"

meta/recipes-devtools/python/python-dbus_1.1.1.bb export STAGING_INCDIR · line 27

Quoted 4 lines
meta/recipes-devtools/python/python-dbus_1.1.1.bb +2 -0
 FILES_${PN}-dev += "${libdir}/pkgconfig"
+
+RDEPENDS_${PN}_virtclass-native = "python"

Does RDEPENDS_${PN} work for native recipes? I thought that R* vars are for runtime packages and native builds doesn't provide them imho.

Quoted 4 lines

And if they do, why not explicitly ask for python-native, because target python wont help I guess.

The idea here was that rdepends should be overwritten as - python-io python-logging python-stringold python-threading python-xml - are not native packages. While compiling (python-dbus-native) build-system is looking for python-io-native for example which wrong and fails:
ERROR: Nothing RPROVIDES 'python-io-native'

Do you think of a better solution?

Thank you

Quoted 19 lines
Quoted 9 lines
meta/recipes-devtools/python/python-dbus_1.1.1.bb +1 -1
+BBCLASSEXTEND = "native"
--

1.7.5.4

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

--
Martin 'JaMa' Jansa jabber: [email protected]

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

#4 lore raw

PATCH 2/2 dbus-tests: Add separate recipe for building dbus-tests

In reply to Andrei Gherzan

While compiling dbus with tests, dbus and dbus-glib are needed. To compile dbus-glib, dbus is needed (obviously). The only solution (to compile dbus with tests) is to create a new recipe where to compile dbus with --enable-tests --enable-embedded-tests, skip write to sysroot (noexec) and just package dbus-tests.
A bash wrapper to run all tests is included.

---
 meta/recipes-core/dbus/dbus-tests/run_test.sh |   22 +++++++++
 meta/recipes-core/dbus/dbus-tests_1.4.20.bb   |   64 +++++++++++++++++++++++++
 2 files changed, 86 insertions(+), 0 deletions(-)
 create mode 100755 meta/recipes-core/dbus/dbus-tests/run_test.sh
 create mode 100644 meta/recipes-core/dbus/dbus-tests_1.4.20.bb
meta/recipes-core/dbus/dbus-tests/run_test.sh new file +22 -0
new file mode 100755
index 0000000..90abad2
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+# Tests location
+export DBUS_TEST_HOMEDIR=/usr/lib/dbus-tests
+# Tests data location
+export DBUS_TEST_DATA=${DBUS_TEST_HOMEDIR}/test/data
+
+TESTS=" \
+	bus/bus-test \
+	bus/bus-test-system \
+	dbus/dbus-test \
+	bus/bus-test-launch-helper \
+	test/shell-test \
+	test/test-corrupt \
+	test/test-dbus-daemon \
+	test/test-loopback \
+	test/test-marshal \
+	test/test-relay \
+	test/test-syslog \
+	test/test-refs"
+
+${DBUS_TEST_HOMEDIR}/test/dbus-test-runner ${DBUS_TEST_HOMEDIR} ${TESTS}
meta/recipes-core/dbus/dbus-tests_1.4.20.bb new file +64 -0

64 lines not on this page · raw message

Signature · 1 line
1.7.5.4
#5 lore raw

Re: [PATCH 2/2] dbus-tests: Add separate recipe for building dbus-tests

Quoted 49 lines · Andrei Gherzan

While compiling dbus with tests, dbus and dbus-glib are needed. To compile dbus-glib, dbus is needed (obviously). The only solution (to compile dbus with tests) is to create a new recipe where to compile dbus with --enable-tests --enable-embedded-tests, skip write to sysroot (noexec) and just package dbus-tests.
A bash wrapper to run all tests is included.

---
  meta/recipes-core/dbus/dbus-tests/run_test.sh |   22 +++++++++
  meta/recipes-core/dbus/dbus-tests_1.4.20.bb   |   64 +++++++++++++++++++++++++
  2 files changed, 86 insertions(+), 0 deletions(-)

create mode 100755 meta/recipes-core/dbus/dbus-tests/run_test.sh create mode 100644 meta/recipes-core/dbus/dbus-tests_1.4.20.bb

meta/recipes-core/dbus/dbus-tests/run_test.sh new file +22 -0
new file mode 100755
index 0000000..90abad2
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+# Tests location
+export DBUS_TEST_HOMEDIR=/usr/lib/dbus-tests
+# Tests data location
+export DBUS_TEST_DATA=${DBUS_TEST_HOMEDIR}/test/data
+
+TESTS=" \
+	bus/bus-test \
+	bus/bus-test-system \
+	dbus/dbus-test \
+	bus/bus-test-launch-helper \
+	test/shell-test \
+	test/test-corrupt \
+	test/test-dbus-daemon \
+	test/test-loopback \
+	test/test-marshal \
+	test/test-relay \
+	test/test-syslog \
+	test/test-refs"
+
+${DBUS_TEST_HOMEDIR}/test/dbus-test-runner ${DBUS_TEST_HOMEDIR} ${TESTS}
meta/recipes-core/dbus/dbus-tests_1.4.20.bb new file +0 -0
new file mode 100644
index 0000000..0e7d272

meta/recipes-core/dbus/dbus-tests_1.4.20.bb line 10

Quoted 10 lines
meta/recipes-core/dbus/dbus-tests_1.4.20.bb new file +10 -0
@@ -0,0 +1,64 @@
+FILESEXTRAPATHS_append := "${THISDIR}/dbus-${PV}"
+include recipes-core/dbus/dbus.inc
+
+PR = "${INC_PR}.0"
+
+SRC_URI[md5sum] = "79eca2f2c1894ac347acce128314428b"
+SRC_URI[sha256sum] = "103bdcd261a13140730b5fa69f56a98ab5c89ba3f0116ea62fcfd639520d5aaf"
+
+DEPENDS += "python-pygobject-native python-dbus-native dbus-glib dbus"
+RDEPENDS_${PN} = "dbus-x11"

wouldn't RDEPENDS_${PN} = "dbus" be a better choice since dbus-x11 is RPROVIDED only for compatibility reasons?

radu

#6 lore raw

Re: [PATCH 2/2] dbus-tests: Add separate recipe for building dbus-tests

Quoted 64 lines · Radu Moisan

On 08/17/2012 04:02 PM, Andrei Gherzan wrote:

While compiling dbus with tests, dbus and dbus-glib are needed. To compile dbus-glib, dbus is needed (obviously). The only solution (to compile dbus with tests) is to create a new recipe where to compile dbus with --enable-tests --enable-embedded-tests, skip write to sysroot (noexec) and just package dbus-tests.
A bash wrapper to run all tests is included.

---
 meta/recipes-core/dbus/dbus-tests/run_test.sh |   22 +++++++++
 meta/recipes-core/dbus/dbus-tests_1.4.20.bb   |   64 +++++++++++++++++++++++++
 2 files changed, 86 insertions(+), 0 deletions(-)
 create mode 100755 meta/recipes-core/dbus/dbus-tests/run_test.sh
 create mode 100644 meta/recipes-core/dbus/dbus-tests_1.4.20.bb
meta/recipes-core/dbus/dbus-tests/run_test.sh new file +22 -0
new file mode 100755
index 0000000..90abad2
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+# Tests location
+export DBUS_TEST_HOMEDIR=/usr/lib/dbus-tests
+# Tests data location
+export DBUS_TEST_DATA=${DBUS_TEST_HOMEDIR}/test/data
+
+TESTS=" \
+	bus/bus-test \
+	bus/bus-test-system \
+	dbus/dbus-test \
+	bus/bus-test-launch-helper \
+	test/shell-test \
+	test/test-corrupt \
+	test/test-dbus-daemon \
+	test/test-loopback \
+	test/test-marshal \
+	test/test-relay \
+	test/test-syslog \
+	test/test-refs"
+
+${DBUS_TEST_HOMEDIR}/test/dbus-test-runner ${DBUS_TEST_HOMEDIR} ${TESTS}
meta/recipes-core/dbus/dbus-tests_1.4.20.bb new file +10 -0
new file mode 100644
index 0000000..0e7d272
@@ -0,0 +1,64 @@
+FILESEXTRAPATHS_append := "${THISDIR}/dbus-${PV}"
+include recipes-core/dbus/dbus.inc
+
+PR = "${INC_PR}.0"
+
+SRC_URI[md5sum] = "79eca2f2c1894ac347acce128314428b"
+SRC_URI[sha256sum] = "103bdcd261a13140730b5fa69f56a98ab5c89ba3f0116ea62fcfd639520d5aaf"
+
+DEPENDS += "python-pygobject-native python-dbus-native dbus-glib dbus"
+RDEPENDS_${PN} = "dbus-x11"
 
 wouldn't RDEPENDS_${PN} = "dbus" be a better choice since dbus-x11 is
Quoted 3 lines

RPROVIDED only for compatibility reasons?

Yes. Forgot about that. Thanks.
ag