]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
dbus-test: merge into main dbus recipe
authorAlexander Kanavin <alex.kanavin@gmail.com>
Wed, 9 Mar 2022 22:22:12 +0000 (23:22 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 15 Mar 2022 08:38:28 +0000 (08:38 +0000)
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.

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/conf/distro/include/maintainers.inc
meta/conf/distro/include/ptest-packagelists.inc
meta/recipes-core/dbus/dbus-test_1.12.22.bb [deleted file]
meta/recipes-core/dbus/dbus.inc
meta/recipes-core/dbus/dbus/run-ptest
meta/recipes-core/dbus/dbus_1.12.22.bb
meta/recipes-core/glib-2.0/glib.inc

index 3fceb6701bb20a910a5f1ae042b5af40622e2391..a8eceaadf4dbc2a872b74f07bcb8302afb54c9a8 100644 (file)
@@ -134,7 +134,6 @@ RECIPE_MAINTAINER:pn-cwautomacros = "Ross Burton <ross.burton@arm.com>"
 RECIPE_MAINTAINER:pn-db = "Unassigned <unassigned@yoctoproject.org>"
 RECIPE_MAINTAINER:pn-dbus = "Chen Qi <Qi.Chen@windriver.com>"
 RECIPE_MAINTAINER:pn-dbus-glib = "Chen Qi <Qi.Chen@windriver.com>"
-RECIPE_MAINTAINER:pn-dbus-test = "Chen Qi <Qi.Chen@windriver.com>"
 RECIPE_MAINTAINER:pn-dbus-wait = "Chen Qi <Qi.Chen@windriver.com>"
 RECIPE_MAINTAINER:pn-debianutils = "Yi Zhao <yi.zhao@windriver.com>"
 RECIPE_MAINTAINER:pn-dejagnu = "Nathan Rossi <nathan@nathanrossi.com>"
index c503a6a59498f603d5c9ebe147c823d9514b51d0..402fb87a3c3af308ef2684d52b29a9dfc5d2b12c 100644 (file)
@@ -76,7 +76,7 @@ PTESTS_SLOW = "\
     babeltrace2-ptest \
     busybox-ptest \
     coreutils-ptest \
-    dbus-test-ptest \
+    dbus-ptest \
     e2fsprogs-ptest \
     findutils-ptest \
     glib-2.0-ptest \
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 (file)
index ae70301..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-SUMMARY = "D-Bus test package (for D-bus functionality testing only)"
-HOMEPAGE = "http://dbus.freedesktop.org"
-SECTION = "base"
-
-require dbus.inc
-
-SRC_URI += "file://run-ptest \
-            file://python-config.patch \
-           "
-
-DEPENDS = "dbus glib-2.0"
-
-RDEPENDS:${PN}-dev = ""
-
-S="${WORKDIR}/dbus-${PV}"
-FILESEXTRAPATHS =. "${FILE_DIRNAME}/dbus:"
-
-inherit ptest
-
-EXTRA_OECONF += "--enable-tests \
-                --enable-modular-tests \
-                --enable-installed-tests \
-                --enable-checks \
-                --enable-asserts \
-                --with-dbus-test-dir=${PTEST_PATH} \
-                --enable-embedded-tests \
-             "
-
-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 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
-
-       install -d ${D}${PTEST_PATH}/test/.libs
-       cp -a ${B}/dbus/.libs/*.so* ${D}${PTEST_PATH}/test/.libs
-
-       # Remove build host references...
-       find "${D}${PTEST_PATH}/test/data" \( -name *.service -o -name *.conf -o -name "*.aaprofile" \) -type f -exec \
-               sed -i \
-                -e 's:${B}:${PTEST_PATH}:g' \
-                {} +
-        sed -i -e 's;@PTEST_PATH@;${PTEST_PATH};g'  ${D}${PTEST_PATH}/run-ptest
-}
-
-RDEPENDS:${PN}-ptest += "bash make dbus"
-RDEPENDS:${PN}-ptest:remove = "${PN}"
-
-PRIVATE_LIBS:${PN}-ptest = "libdbus-1.so.3"
index cb4c56db92aa9b5f3207d4a925880293d308704c..8e6f597c0a0fb26b11b1162507f688a455aa238e 100644 (file)
@@ -1,10 +1,12 @@
-inherit autotools pkgconfig gettext upstream-version-is-even
+inherit autotools pkgconfig gettext upstream-version-is-even ptest-gnome
 
 LICENSE = "AFL-2.1 | GPL-2.0-or-later"
 LIC_FILES_CHKSUM = "file://COPYING;md5=10dded3b58148f3f1fd804b26354af3e \
                     file://dbus/dbus.h;beginline=6;endline=20;md5=7755c9d7abccd5dbd25a6a974538bb3c"
 
 SRC_URI = "https://dbus.freedesktop.org/releases/dbus/dbus-${PV}.tar.gz \
+           file://run-ptest \
+           file://python-config.patch \
            file://tmpdir.patch \
            file://dbus-1.init \
            file://clear-guid_from_server-if-send_negotiate_unix_f.patch \
@@ -17,6 +19,9 @@ EXTRA_OECONF = "--disable-xml-docs \
                 --disable-doxygen-docs \
                 --enable-largefile \
                 --with-system-socket=/run/dbus/system_bus_socket \
+                --enable-tests \
+                --enable-checks \
+                --enable-asserts \
                 "
 EXTRA_OECONF:append:class-target = " SYSTEMCTL=${base_bindir}/systemctl"
 
index d3eec08235d4ac4a0b08d3f48ba5bb74de29d2e9..54f43e1f686bf74a7acf6f3649a63c64a4b962a9 100755 (executable)
@@ -1,35 +1,3 @@
 #!/bin/sh
-
-output() {
-  retcode=$?
-  if [ $retcode -eq 0 ]
-    then echo "PASS: $i"
-  elif [ $retcode -eq 77 ]
-    then echo "SKIP: $i"
-  else echo "FAIL: $i"
-  fi
-}
-
-export DBUS_TEST_HOMEDIR=./test
-export XDG_RUNTIME_DIR=./test
-export LD_LIBRARY_PATH=@PTEST_PATH@/test/.libs
-
-files=`ls test/test-*`
-
-for i in $files
-do
-     #these programs are used by testcase test-bus, don't run here
-     #additionally, test-names needs to be run under X
-     if [ $i = "test/test-service" ] \
-        || [ $i = "test/test-shell-service" ] \
-        || [ $i = "test/test-segfault" ] \
-        || [ $i = "test/test-bus" ] \
-        || [ $i = "test/test-names" ]
-     then
-         continue
-     fi
-
-     ./$i ./test/data >/dev/null 2>&1
-     output
-done 
+gnome-desktop-testing-runner dbus
 
index 48947209d934db50251d562ec4e1a85252a425d9..e611e7d98a35e1455827b3fbaf0d277bf403af90 100644 (file)
@@ -5,10 +5,7 @@ SECTION = "base"
 
 require dbus.inc
 
-DEPENDS = "expat virtual/libintl autoconf-archive"
-PACKAGES += "${@bb.utils.contains('DISTRO_FEATURES', 'ptest', '${PN}-ptest', '', d)}"
-ALLOW_EMPTY:dbus-ptest = "1"
-RDEPENDS:dbus-ptest:class-target = "dbus-test-ptest"
+DEPENDS = "expat virtual/libintl autoconf-archive glib-2.0"
 RDEPENDS:${PN} += "${PN}-common ${PN}-tools"
 RDEPENDS:${PN}:class-native = ""
 
@@ -73,6 +70,8 @@ FILES:${PN}-lib = "${libdir}/lib*.so.*"
 RRECOMMENDS:${PN}-lib = "${PN}"
 FILES:${PN}-dev += "${libdir}/dbus-1.0/include ${bindir}/dbus-test-tool ${datadir}/xml/dbus-1"
 
+RDEPENDS:${PN}-ptest += "bash make dbus"
+
 PACKAGE_WRITE_DEPS += "${@bb.utils.contains('DISTRO_FEATURES','systemd sysvinit','systemd-systemctl-native','',d)}"
 pkg_postinst:dbus() {
        # If both systemd and sysvinit are enabled, mask the dbus-1 init script
@@ -89,8 +88,6 @@ pkg_postinst:dbus() {
 }
 
 
-EXTRA_OECONF += "--disable-tests"
-
 do_install() {
        autotools_do_install
 
@@ -149,5 +146,3 @@ do_install:class-nativesdk() {
        rm -rf ${D}${localstatedir}/run
 }
 BBCLASSEXTEND = "native nativesdk"
-
-INSANE_SKIP:${PN}-ptest += "build-deps"
index 268e48a088b51d38a6a6e08ff7fef4be93b841d8..6e20d40dacd23a232a5e0d60d41f3f2ed9902bae 100644 (file)
@@ -43,7 +43,7 @@ PACKAGECONFIG[libmount] = "-Dlibmount=enabled,-Dlibmount=disabled,util-linux"
 PACKAGECONFIG[manpages] = "-Dman=true, -Dman=false, libxslt-native xmlto-native"
 # libelf is auto-detected without a configuration option
 PACKAGECONFIG[libelf] = ",,elfutils"
-PACKAGECONFIG[tests] = "-Dinstalled_tests=true,-Dinstalled_tests=false,dbus"
+PACKAGECONFIG[tests] = "-Dinstalled_tests=true,-Dinstalled_tests=false,"
 PACKAGECONFIG[selinux] = "-Dselinux=enabled,-Dselinux=disabled,libselinux"
 
 EXTRA_OEMESON = "-Ddtrace=false -Dfam=false -Dsystemtap=false"