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



commit 182fef9c94985a1e26f7b7f94b205528ec806c76
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 | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 63a6ae3ac..63f268675 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -162,7 +162,15 @@ 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 \
+              --env=LANG=C.UTF-8 \
+              --env=NO_AT_BRIDGE=1 \
+              app \
+              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]