summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/dbus
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2022-03-09 23:22:12 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-03-15 08:40:09 +0000
commit73673240555a5cf446edc8512a16228cf0ef6241 (patch)
tree393e6cbd238e6f86ca37542041af4df7ab5e5019 /meta/recipes-core/dbus
parent5d11e2028e9674df2a548ea93f1d6a4351973038 (diff)
downloadpoky-73673240555a5cf446edc8512a16228cf0ef6241.tar.gz
dbus-test: merge into main dbus recipe
The reason it was separate is that there is a peculiar circular dependency: dbus tests require glib, while some of glib's gdbus tests require dbus. So dbus was built with tests disabled and without glib dependency, then glib was built with dbus dependency, then dbus was built again with glib dependency and tests enabled, only for the purpose of installing those tests. I find that brittle and hacky, so this removes dbus dependecy from glib (the fallout is that some gdbus tests are no longer being executed), and dbus and its tests are built once, after glib. Conversely, dbus is now dependent on glib for the purpose of building the tests. Also, dbus ptest installation is no longer using custom code, and dbus run-ptest simply uses standard installed tests execution mechanism from gnome. (From OE-Core rev: cfecef4e6925865961858d0fe5ffc7794c71cd3b) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/dbus')
-rw-r--r--meta/recipes-core/dbus/dbus-test_1.12.22.bb64
-rw-r--r--meta/recipes-core/dbus/dbus.inc7
-rwxr-xr-xmeta/recipes-core/dbus/dbus/run-ptest34
-rw-r--r--meta/recipes-core/dbus/dbus_1.12.22.bb11
4 files changed, 10 insertions, 106 deletions
diff --git a/meta/recipes-core/dbus/dbus-test_1.12.22.bb b/meta/recipes-core/dbus/dbus-test_1.12.22.bb
deleted file mode 100644
index ae70301431..0000000000
--- a/meta/recipes-core/dbus/dbus-test_1.12.22.bb
+++ /dev/null
@@ -1,64 +0,0 @@
1SUMMARY = "D-Bus test package (for D-bus functionality testing only)"
2HOMEPAGE = "http://dbus.freedesktop.org"
3SECTION = "base"
4
5require dbus.inc
6
7SRC_URI += "file://run-ptest \
8 file://python-config.patch \
9 "
10
11DEPENDS = "dbus glib-2.0"
12
13RDEPENDS:${PN}-dev = ""
14
15S="${WORKDIR}/dbus-${PV}"
16FILESEXTRAPATHS =. "${FILE_DIRNAME}/dbus:"
17
18inherit ptest
19
20EXTRA_OECONF += "--enable-tests \
21 --enable-modular-tests \
22 --enable-installed-tests \
23 --enable-checks \
24 --enable-asserts \
25 --with-dbus-test-dir=${PTEST_PATH} \
26 --enable-embedded-tests \
27 "
28
29do_install() {
30 :
31}
32
33do_install_ptest() {
34 install -d ${D}${PTEST_PATH}/test
35 l="shell printf refs syslog marshal syntax corrupt dbus-daemon dbus-daemon-eavesdrop loopback relay \
36 variant uid-permissions syntax spawn sd-activation names monitor message fdpass service shell-service"
37 for i in $l; do install ${B}/test/.libs/test-$i ${D}${PTEST_PATH}/test; done
38
39 l="bus bus-system bus-launch-helper"
40 for i in $l; do install ${B}/bus/.libs/test-$i ${D}${PTEST_PATH}/test; done
41
42 install -d ${D}${PTEST_PATH}/bus
43 install ${B}/bus/.libs/dbus-daemon-launch-helper-test ${D}${PTEST_PATH}/bus
44
45 install ${B}/test/test-segfault ${D}${PTEST_PATH}/test
46
47 cp -r ${B}/test/data ${D}${PTEST_PATH}/test
48 install ${B}/dbus/.libs/test-dbus ${D}${PTEST_PATH}/test
49
50 install -d ${D}${PTEST_PATH}/test/.libs
51 cp -a ${B}/dbus/.libs/*.so* ${D}${PTEST_PATH}/test/.libs
52
53 # Remove build host references...
54 find "${D}${PTEST_PATH}/test/data" \( -name *.service -o -name *.conf -o -name "*.aaprofile" \) -type f -exec \
55 sed -i \
56 -e 's:${B}:${PTEST_PATH}:g' \
57 {} +
58 sed -i -e 's;@PTEST_PATH@;${PTEST_PATH};g' ${D}${PTEST_PATH}/run-ptest
59}
60
61RDEPENDS:${PN}-ptest += "bash make dbus"
62RDEPENDS:${PN}-ptest:remove = "${PN}"
63
64PRIVATE_LIBS:${PN}-ptest = "libdbus-1.so.3"
diff --git a/meta/recipes-core/dbus/dbus.inc b/meta/recipes-core/dbus/dbus.inc
index cb4c56db92..8e6f597c0a 100644
--- a/meta/recipes-core/dbus/dbus.inc
+++ b/meta/recipes-core/dbus/dbus.inc
@@ -1,10 +1,12 @@
1inherit autotools pkgconfig gettext upstream-version-is-even 1inherit autotools pkgconfig gettext upstream-version-is-even ptest-gnome
2 2
3LICENSE = "AFL-2.1 | GPL-2.0-or-later" 3LICENSE = "AFL-2.1 | GPL-2.0-or-later"
4LIC_FILES_CHKSUM = "file://COPYING;md5=10dded3b58148f3f1fd804b26354af3e \ 4LIC_FILES_CHKSUM = "file://COPYING;md5=10dded3b58148f3f1fd804b26354af3e \
5 file://dbus/dbus.h;beginline=6;endline=20;md5=7755c9d7abccd5dbd25a6a974538bb3c" 5 file://dbus/dbus.h;beginline=6;endline=20;md5=7755c9d7abccd5dbd25a6a974538bb3c"
6 6
7SRC_URI = "https://dbus.freedesktop.org/releases/dbus/dbus-${PV}.tar.gz \ 7SRC_URI = "https://dbus.freedesktop.org/releases/dbus/dbus-${PV}.tar.gz \
8 file://run-ptest \
9 file://python-config.patch \
8 file://tmpdir.patch \ 10 file://tmpdir.patch \
9 file://dbus-1.init \ 11 file://dbus-1.init \
10 file://clear-guid_from_server-if-send_negotiate_unix_f.patch \ 12 file://clear-guid_from_server-if-send_negotiate_unix_f.patch \
@@ -17,6 +19,9 @@ EXTRA_OECONF = "--disable-xml-docs \
17 --disable-doxygen-docs \ 19 --disable-doxygen-docs \
18 --enable-largefile \ 20 --enable-largefile \
19 --with-system-socket=/run/dbus/system_bus_socket \ 21 --with-system-socket=/run/dbus/system_bus_socket \
22 --enable-tests \
23 --enable-checks \
24 --enable-asserts \
20 " 25 "
21EXTRA_OECONF:append:class-target = " SYSTEMCTL=${base_bindir}/systemctl" 26EXTRA_OECONF:append:class-target = " SYSTEMCTL=${base_bindir}/systemctl"
22 27
diff --git a/meta/recipes-core/dbus/dbus/run-ptest b/meta/recipes-core/dbus/dbus/run-ptest
index d3eec08235..54f43e1f68 100755
--- a/meta/recipes-core/dbus/dbus/run-ptest
+++ b/meta/recipes-core/dbus/dbus/run-ptest
@@ -1,35 +1,3 @@
1#!/bin/sh 1#!/bin/sh
2 2gnome-desktop-testing-runner dbus
3output() {
4 retcode=$?
5 if [ $retcode -eq 0 ]
6 then echo "PASS: $i"
7 elif [ $retcode -eq 77 ]
8 then echo "SKIP: $i"
9 else echo "FAIL: $i"
10 fi
11}
12
13export DBUS_TEST_HOMEDIR=./test
14export XDG_RUNTIME_DIR=./test
15export LD_LIBRARY_PATH=@PTEST_PATH@/test/.libs
16
17files=`ls test/test-*`
18
19for i in $files
20do
21 #these programs are used by testcase test-bus, don't run here
22 #additionally, test-names needs to be run under X
23 if [ $i = "test/test-service" ] \
24 || [ $i = "test/test-shell-service" ] \
25 || [ $i = "test/test-segfault" ] \
26 || [ $i = "test/test-bus" ] \
27 || [ $i = "test/test-names" ]
28 then
29 continue
30 fi
31
32 ./$i ./test/data >/dev/null 2>&1
33 output
34done
35 3
diff --git a/meta/recipes-core/dbus/dbus_1.12.22.bb b/meta/recipes-core/dbus/dbus_1.12.22.bb
index 48947209d9..e611e7d98a 100644
--- a/meta/recipes-core/dbus/dbus_1.12.22.bb
+++ b/meta/recipes-core/dbus/dbus_1.12.22.bb
@@ -5,10 +5,7 @@ SECTION = "base"
5 5
6require dbus.inc 6require dbus.inc
7 7
8DEPENDS = "expat virtual/libintl autoconf-archive" 8DEPENDS = "expat virtual/libintl autoconf-archive glib-2.0"
9PACKAGES += "${@bb.utils.contains('DISTRO_FEATURES', 'ptest', '${PN}-ptest', '', d)}"
10ALLOW_EMPTY:dbus-ptest = "1"
11RDEPENDS:dbus-ptest:class-target = "dbus-test-ptest"
12RDEPENDS:${PN} += "${PN}-common ${PN}-tools" 9RDEPENDS:${PN} += "${PN}-common ${PN}-tools"
13RDEPENDS:${PN}:class-native = "" 10RDEPENDS:${PN}:class-native = ""
14 11
@@ -73,6 +70,8 @@ FILES:${PN}-lib = "${libdir}/lib*.so.*"
73RRECOMMENDS:${PN}-lib = "${PN}" 70RRECOMMENDS:${PN}-lib = "${PN}"
74FILES:${PN}-dev += "${libdir}/dbus-1.0/include ${bindir}/dbus-test-tool ${datadir}/xml/dbus-1" 71FILES:${PN}-dev += "${libdir}/dbus-1.0/include ${bindir}/dbus-test-tool ${datadir}/xml/dbus-1"
75 72
73RDEPENDS:${PN}-ptest += "bash make dbus"
74
76PACKAGE_WRITE_DEPS += "${@bb.utils.contains('DISTRO_FEATURES','systemd sysvinit','systemd-systemctl-native','',d)}" 75PACKAGE_WRITE_DEPS += "${@bb.utils.contains('DISTRO_FEATURES','systemd sysvinit','systemd-systemctl-native','',d)}"
77pkg_postinst:dbus() { 76pkg_postinst:dbus() {
78 # If both systemd and sysvinit are enabled, mask the dbus-1 init script 77 # If both systemd and sysvinit are enabled, mask the dbus-1 init script
@@ -89,8 +88,6 @@ pkg_postinst:dbus() {
89} 88}
90 89
91 90
92EXTRA_OECONF += "--disable-tests"
93
94do_install() { 91do_install() {
95 autotools_do_install 92 autotools_do_install
96 93
@@ -149,5 +146,3 @@ do_install:class-nativesdk() {
149 rm -rf ${D}${localstatedir}/run 146 rm -rf ${D}${localstatedir}/run
150} 147}
151BBCLASSEXTEND = "native nativesdk" 148BBCLASSEXTEND = "native nativesdk"
152
153INSANE_SKIP:${PN}-ptest += "build-deps"