blob: ae70301431947de39dd963043943a77f533b4d0d [file] [log] [blame]
Brad Bishop19323692019-04-05 15:28:33 -04001SUMMARY = "D-Bus test package (for D-bus functionality testing only)"
2HOMEPAGE = "http://dbus.freedesktop.org"
3SECTION = "base"
Andrew Geisslerd25ed322020-06-27 00:28:28 -05004
5require dbus.inc
6
7SRC_URI += "file://run-ptest \
8 file://python-config.patch \
9 "
Brad Bishop19323692019-04-05 15:28:33 -040010
11DEPENDS = "dbus glib-2.0"
12
Patrick Williams213cb262021-08-07 19:21:33 -050013RDEPENDS:${PN}-dev = ""
Brad Bishop19323692019-04-05 15:28:33 -040014
Brad Bishop19323692019-04-05 15:28:33 -040015S="${WORKDIR}/dbus-${PV}"
16FILESEXTRAPATHS =. "${FILE_DIRNAME}/dbus:"
17
Andrew Geisslerd25ed322020-06-27 00:28:28 -050018inherit ptest
Brad Bishop19323692019-04-05 15:28:33 -040019
Andrew Geisslerd25ed322020-06-27 00:28:28 -050020EXTRA_OECONF += "--enable-tests \
Brad Bishop19323692019-04-05 15:28:33 -040021 --enable-modular-tests \
22 --enable-installed-tests \
23 --enable-checks \
24 --enable-asserts \
Brad Bishop19323692019-04-05 15:28:33 -040025 --with-dbus-test-dir=${PTEST_PATH} \
Brad Bishopc342db32019-05-15 21:57:59 -040026 --enable-embedded-tests \
27 "
Brad Bishop19323692019-04-05 15:28:33 -040028
Brad Bishop19323692019-04-05 15:28:33 -040029do_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 \
Brad Bishopc342db32019-05-15 21:57:59 -040036 variant uid-permissions syntax spawn sd-activation names monitor message fdpass service shell-service"
Brad Bishop19323692019-04-05 15:28:33 -040037 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
Brad Bishopc342db32019-05-15 21:57:59 -040042 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
Brad Bishop19323692019-04-05 15:28:33 -040047 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
Patrick Williams213cb262021-08-07 19:21:33 -050061RDEPENDS:${PN}-ptest += "bash make dbus"
62RDEPENDS:${PN}-ptest:remove = "${PN}"
Brad Bishop19323692019-04-05 15:28:33 -040063
Patrick Williams213cb262021-08-07 19:21:33 -050064PRIVATE_LIBS:${PN}-ptest = "libdbus-1.so.3"