[oe-commits] [openembedded-core] 02/04: dbus: fix ptest failure

git at git.openembedded.org git at git.openembedded.org
Thu May 2 12:47:33 UTC 2019


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit 2ea676072d7edd06ef9e886827c0d61d574ca377
Author: Changqing Li <changqing.li at windriver.com>
AuthorDate: Wed Apr 17 16:38:26 2019 +0800

    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]
    
    Signed-off-by: Changqing Li <changqing.li at windriver.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 meta/conf/distro/include/ptest-packagelists.inc |  2 +-
 meta/recipes-core/dbus/dbus-test_1.12.12.bb     | 13 ++++++++++---
 meta/recipes-core/dbus/dbus/run-ptest           | 16 ++++++++++++----
 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 52f7439..ec7ed6f 100644
--- a/meta/conf/distro/include/ptest-packagelists.inc
+++ b/meta/conf/distro/include/ptest-packagelists.inc
@@ -10,7 +10,6 @@ PTESTS_FAST = "\
     attr-ptest \
     bluez5-ptest \
     bzip2-ptest \
-    dbus-test-ptest \
     diffstat-ptest \
     diffutils-ptest \
     elfutils-ptest \
@@ -60,6 +59,7 @@ PTESTS_FAST = "\
 PTESTS_SLOW = "\
     bash-ptest \
     busybox-ptest \
+    dbus-test-ptest \
     e2fsprogs-ptest \
     glib-2.0-ptest \
     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 f413192..0502c44 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 \
                 --enable-installed-tests \
                 --enable-checks \
                 --enable-asserts \
-                --enable-verbose-mode \
                 --enable-largefile \
                 --disable-xml-docs \
                 --disable-doxygen-docs \
                 --disable-libaudit \
                 --with-dbus-test-dir=${PTEST_PATH} \
-                ${EXTRA_OECONF_X}"
+                ${EXTRA_OECONF_X} \
+                --enable-embedded-tests \
+             "
 
 EXTRA_OECONF_append_class-target = " SYSTEMCTL=${base_bindir}/systemctl"
 
@@ -50,6 +51,7 @@ PACKAGECONFIG_class-nativesdk = ""
 PACKAGECONFIG[systemd] = "--enable-systemd --with-systemdsystemunitdir=${systemd_system_unitdir},--disable-systemd --without-systemdsystemunitdir,systemd"
 PACKAGECONFIG[x11] = "--with-x --enable-x11-autolaunch,--without-x --disable-x11-autolaunch, virtual/libx11 libsm"
 PACKAGECONFIG[user-session] = "--enable-user-session --with-systemduserunitdir=${systemd_user_unitdir},--disable-user-session"
+PACKAGECONFIG[verbose-mode] = "--enable-verbose-mode,,,"
 
 do_install() {
     :
@@ -58,12 +60,17 @@ do_install() {
 do_install_ptest() {
 	install -d ${D}${PTEST_PATH}/test
 	l="shell printf refs syslog marshal syntax corrupt dbus-daemon dbus-daemon-eavesdrop loopback relay \
-	   variant uid-permissions syntax spawn sd-activation names monitor message fdpass "
+	   variant uid-permissions syntax spawn sd-activation names monitor message fdpass service shell-service"
 	for i in $l; do install ${B}/test/.libs/test-$i ${D}${PTEST_PATH}/test; done
 
 	l="bus bus-system bus-launch-helper"
 	for i in $l; do install ${B}/bus/.libs/test-$i ${D}${PTEST_PATH}/test; done
 
+	install -d ${D}${PTEST_PATH}/bus
+	install ${B}/bus/.libs/dbus-daemon-launch-helper-test ${D}${PTEST_PATH}/bus
+
+	install ${B}/test/test-segfault ${D}${PTEST_PATH}/test
+
 	cp -r ${B}/test/data ${D}${PTEST_PATH}/test
 	install ${B}/dbus/.libs/test-dbus ${D}${PTEST_PATH}/test
 
diff --git a/meta/recipes-core/dbus/dbus/run-ptest b/meta/recipes-core/dbus/dbus/run-ptest
index 353ba1e..cf2e68f 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
 files=`ls test/test-*`
 
 for i in $files
-	do
-		./$i ./test/data >/dev/null
-		output
-	done
+do
+     #these programs are used by testcase test-bus, don't run here
+     if [ $i = "test/test-service" ] \
+        || [ $i = "test/test-shell-service" ] \
+        || [ $i = "test/test-segfault" ]
+     then
+         continue
+     fi
+
+     ./$i ./test/data >/dev/null 2>&1
+     output
+done 
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list