summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChangqing Li <changqing.li@windriver.com>2019-04-17 16:38:26 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-05-03 06:11:57 +0100
commit8216015a85812a225563ac85149ecaf37678d2c6 (patch)
tree45f3e97c7f4f8d64874a51bbacb15453716a24bb
parent69085ccb296b35b0b0ed67c871f0f60106c27a48 (diff)
downloadpoky-8216015a85812a225563ac85149ecaf37678d2c6.tar.gz
dbus: fix ptest failure
1. since one bug in run-ptest, testcase test-bus have never been actually run (althrough it's result is PASS). After commit 0828850, test-bus can actually run but it did not install: test-service, test-shell-service, test-segfault, and dbus-daemon-launch-helper-test Add the configure flag: --enable-embedded-tests to generate binary dbus-daemon-launch-helper-test, then install them so that test-bus will now pass. 2. fix testcase test-dbus-daemon failed we enable --enable-verbose-mode in recipe dbus-test, and don't enable it in recipe dbus. This will make below test code get unexpect result of have_verbose and assert. disable --enable-verbose-mode for recipe dbus-test to fix it. #ifdef DBUS_ENABLE_STATS g_assert_true (have_stats); #else g_assert_false (have_stats); #endif [RP: Since the new test is slow dbus moves to the slow ptest list] (From OE-Core rev: 2ea676072d7edd06ef9e886827c0d61d574ca377) Signed-off-by: Changqing Li <changqing.li@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/conf/distro/include/ptest-packagelists.inc2
-rw-r--r--meta/recipes-core/dbus/dbus-test_1.12.12.bb13
-rwxr-xr-xmeta/recipes-core/dbus/dbus/run-ptest16
3 files changed, 23 insertions, 8 deletions
diff --git a/meta/conf/distro/include/ptest-packagelists.inc b/meta/conf/distro/include/ptest-packagelists.inc
index 52f7439e25..ec7ed6fa4d 100644
--- a/meta/conf/distro/include/ptest-packagelists.inc
+++ b/meta/conf/distro/include/ptest-packagelists.inc
@@ -10,7 +10,6 @@ PTESTS_FAST = "\
10 attr-ptest \ 10 attr-ptest \
11 bluez5-ptest \ 11 bluez5-ptest \
12 bzip2-ptest \ 12 bzip2-ptest \
13 dbus-test-ptest \
14 diffstat-ptest \ 13 diffstat-ptest \
15 diffutils-ptest \ 14 diffutils-ptest \
16 elfutils-ptest \ 15 elfutils-ptest \
@@ -60,6 +59,7 @@ PTESTS_FAST = "\
60PTESTS_SLOW = "\ 59PTESTS_SLOW = "\
61 bash-ptest \ 60 bash-ptest \
62 busybox-ptest \ 61 busybox-ptest \
62 dbus-test-ptest \
63 e2fsprogs-ptest \ 63 e2fsprogs-ptest \
64 glib-2.0-ptest \ 64 glib-2.0-ptest \
65 gstreamer1.0-ptest \ 65 gstreamer1.0-ptest \
diff --git a/meta/recipes-core/dbus/dbus-test_1.12.12.bb b/meta/recipes-core/dbus/dbus-test_1.12.12.bb
index f4131926c2..0502c44917 100644
--- a/meta/recipes-core/dbus/dbus-test_1.12.12.bb
+++ b/meta/recipes-core/dbus/dbus-test_1.12.12.bb
@@ -33,13 +33,14 @@ EXTRA_OECONF = "--enable-tests \
33 --enable-installed-tests \ 33 --enable-installed-tests \
34 --enable-checks \ 34 --enable-checks \
35 --enable-asserts \ 35 --enable-asserts \
36 --enable-verbose-mode \
37 --enable-largefile \ 36 --enable-largefile \
38 --disable-xml-docs \ 37 --disable-xml-docs \
39 --disable-doxygen-docs \ 38 --disable-doxygen-docs \
40 --disable-libaudit \ 39 --disable-libaudit \
41 --with-dbus-test-dir=${PTEST_PATH} \ 40 --with-dbus-test-dir=${PTEST_PATH} \
42 ${EXTRA_OECONF_X}" 41 ${EXTRA_OECONF_X} \
42 --enable-embedded-tests \
43 "
43 44
44EXTRA_OECONF_append_class-target = " SYSTEMCTL=${base_bindir}/systemctl" 45EXTRA_OECONF_append_class-target = " SYSTEMCTL=${base_bindir}/systemctl"
45 46
@@ -50,6 +51,7 @@ PACKAGECONFIG_class-nativesdk = ""
50PACKAGECONFIG[systemd] = "--enable-systemd --with-systemdsystemunitdir=${systemd_system_unitdir},--disable-systemd --without-systemdsystemunitdir,systemd" 51PACKAGECONFIG[systemd] = "--enable-systemd --with-systemdsystemunitdir=${systemd_system_unitdir},--disable-systemd --without-systemdsystemunitdir,systemd"
51PACKAGECONFIG[x11] = "--with-x --enable-x11-autolaunch,--without-x --disable-x11-autolaunch, virtual/libx11 libsm" 52PACKAGECONFIG[x11] = "--with-x --enable-x11-autolaunch,--without-x --disable-x11-autolaunch, virtual/libx11 libsm"
52PACKAGECONFIG[user-session] = "--enable-user-session --with-systemduserunitdir=${systemd_user_unitdir},--disable-user-session" 53PACKAGECONFIG[user-session] = "--enable-user-session --with-systemduserunitdir=${systemd_user_unitdir},--disable-user-session"
54PACKAGECONFIG[verbose-mode] = "--enable-verbose-mode,,,"
53 55
54do_install() { 56do_install() {
55 : 57 :
@@ -58,12 +60,17 @@ do_install() {
58do_install_ptest() { 60do_install_ptest() {
59 install -d ${D}${PTEST_PATH}/test 61 install -d ${D}${PTEST_PATH}/test
60 l="shell printf refs syslog marshal syntax corrupt dbus-daemon dbus-daemon-eavesdrop loopback relay \ 62 l="shell printf refs syslog marshal syntax corrupt dbus-daemon dbus-daemon-eavesdrop loopback relay \
61 variant uid-permissions syntax spawn sd-activation names monitor message fdpass " 63 variant uid-permissions syntax spawn sd-activation names monitor message fdpass service shell-service"
62 for i in $l; do install ${B}/test/.libs/test-$i ${D}${PTEST_PATH}/test; done 64 for i in $l; do install ${B}/test/.libs/test-$i ${D}${PTEST_PATH}/test; done
63 65
64 l="bus bus-system bus-launch-helper" 66 l="bus bus-system bus-launch-helper"
65 for i in $l; do install ${B}/bus/.libs/test-$i ${D}${PTEST_PATH}/test; done 67 for i in $l; do install ${B}/bus/.libs/test-$i ${D}${PTEST_PATH}/test; done
66 68
69 install -d ${D}${PTEST_PATH}/bus
70 install ${B}/bus/.libs/dbus-daemon-launch-helper-test ${D}${PTEST_PATH}/bus
71
72 install ${B}/test/test-segfault ${D}${PTEST_PATH}/test
73
67 cp -r ${B}/test/data ${D}${PTEST_PATH}/test 74 cp -r ${B}/test/data ${D}${PTEST_PATH}/test
68 install ${B}/dbus/.libs/test-dbus ${D}${PTEST_PATH}/test 75 install ${B}/dbus/.libs/test-dbus ${D}${PTEST_PATH}/test
69 76
diff --git a/meta/recipes-core/dbus/dbus/run-ptest b/meta/recipes-core/dbus/dbus/run-ptest
index 353ba1e905..cf2e68fa02 100755
--- a/meta/recipes-core/dbus/dbus/run-ptest
+++ b/meta/recipes-core/dbus/dbus/run-ptest
@@ -17,8 +17,16 @@ export LD_LIBRARY_PATH=@PTEST_PATH@/test/.libs
17files=`ls test/test-*` 17files=`ls test/test-*`
18 18
19for i in $files 19for i in $files
20 do 20do
21 ./$i ./test/data >/dev/null 21 #these programs are used by testcase test-bus, don't run here
22 output 22 if [ $i = "test/test-service" ] \
23 done 23 || [ $i = "test/test-shell-service" ] \
24 || [ $i = "test/test-segfault" ]
25 then
26 continue
27 fi
28
29 ./$i ./test/data >/dev/null 2>&1
30 output
31done
24 32