Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 1 | SUMMARY = "D-Bus test package (for D-bus functionality testing only)" |
| 2 | HOMEPAGE = "http://dbus.freedesktop.org" |
| 3 | SECTION = "base" |
Andrew Geissler | d25ed32 | 2020-06-27 00:28:28 -0500 | [diff] [blame] | 4 | |
| 5 | require dbus.inc |
| 6 | |
| 7 | SRC_URI += "file://run-ptest \ |
| 8 | file://python-config.patch \ |
| 9 | " |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 10 | |
| 11 | DEPENDS = "dbus glib-2.0" |
| 12 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 13 | RDEPENDS:${PN}-dev = "" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 14 | |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 15 | S="${WORKDIR}/dbus-${PV}" |
| 16 | FILESEXTRAPATHS =. "${FILE_DIRNAME}/dbus:" |
| 17 | |
Andrew Geissler | d25ed32 | 2020-06-27 00:28:28 -0500 | [diff] [blame] | 18 | inherit ptest |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 19 | |
Andrew Geissler | d25ed32 | 2020-06-27 00:28:28 -0500 | [diff] [blame] | 20 | EXTRA_OECONF += "--enable-tests \ |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 21 | --enable-modular-tests \ |
| 22 | --enable-installed-tests \ |
| 23 | --enable-checks \ |
| 24 | --enable-asserts \ |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 25 | --with-dbus-test-dir=${PTEST_PATH} \ |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 26 | --enable-embedded-tests \ |
| 27 | " |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 28 | |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 29 | do_install() { |
| 30 | : |
| 31 | } |
| 32 | |
| 33 | do_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 Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 36 | variant uid-permissions syntax spawn sd-activation names monitor message fdpass service shell-service" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 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 | |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 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 | |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 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 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 61 | RDEPENDS:${PN}-ptest += "bash make dbus" |
| 62 | RDEPENDS:${PN}-ptest:remove = "${PN}" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 63 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 64 | PRIVATE_LIBS:${PN}-ptest = "libdbus-1.so.3" |