[gnome-software] ci: Run a custom D-Bus daemon for the tests in the CI



commit fec6768e60cbd9a907d5ae0db6919978b8a88655
Author: Philip Withnall <withnall endlessm com>
Date:   Wed Nov 6 11:07:48 2019 +0000

    ci: Run a custom D-Bus daemon for the tests in the CI
    
    This was needed in the old CI, and is inexplicably also needed in the
    new CI, otherwise the `flatpak` tests fail. I haven’t investigated
    further why it’s needed.
    
    Signed-off-by: Philip Withnall <withnall endlessm com>
    
    Helps: #825

 .gitlab-ci/run-tests.sh | 9 +++++++++
 1 file changed, 9 insertions(+)
---
diff --git a/.gitlab-ci/run-tests.sh b/.gitlab-ci/run-tests.sh
index 89226045..8813828c 100755
--- a/.gitlab-ci/run-tests.sh
+++ b/.gitlab-ci/run-tests.sh
@@ -18,6 +18,15 @@ if ! [ $(id -u) = 0 ]; then
     exit 1
 fi
 
+# FIXME: The tests should be isolated and use mock services so they do not
+# require a functioning system bus. This will have to do for now though.
+mkdir -p /run/dbus
+mkdir -p /var
+ln -s /var/run /run
+dbus-daemon --system --fork
+/usr/lib/polkit-1/polkitd --no-debug &
+/usr/libexec/fwupd/fwupd --verbose &
+
 meson test \
         -C _build \
         --timeout-multiplier ${MESON_TEST_TIMEOUT_MULTIPLIER} \


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]