[nautilus/wip/ernestask/leak-plugging: 5/5] CI: Do additional setup before running tests



commit 8df6856fc775342346b6c9d028314acacdd14755
Author: Ernestas Kulik <ernestask gnome org>
Date:   Sun Oct 7 10:52:13 2018 +0300

    CI: Do additional setup before running tests
    
    Setting LANG and NO_AT_BRIDGE will prevent warnings about LANG not being
    set (obviously) (Tracker), and about the a11y bus not being up, which we
    don’t necessarily need to be able to test things.
    
    Starting a D-Bus session before running tests ensures that dbus-launch
    doesn’t croak when Tracker tries to reach the SPARQL backend, because of
    missing X11 support.

 .gitlab-ci.yml | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 63a6ae3ac..034f23bb3 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -162,7 +162,14 @@ flatpak:master:
         - flatpak build app ninja -C _build install
         - flatpak-builder --finish-only --repo=repo app ${MANIFEST_PATH}
         # Run automatic tests inside the Flatpak env
-        - xvfb-run -a -s "-screen 0 1024x768x24" flatpak build app ninja -C _build test
+        # Setting LANG to avoid Tracker complaining and falling back to the same value,
+        # and setting NO_AT_BRIDGE, so that atk-bridge isn’t initialized, preventing
+        # annoying warnings that don’t affect the kinds of tests that we run.
+        - xvfb-run -a -s "-screen 0 1024x768x24" \
+            flatpak build app \
+              --env=LANG=C.UTF-8 \
+              --env=NO_AT_BRIDGE=1 \
+              dbus-run-session meson test -C _build
         # Generate a Flatpak bundle
         - flatpak build-bundle repo ${BUNDLE} --runtime-repo=${RUNTIME_REPO} ${DBUS_ID}
     artifacts:


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