[mutter] ci: Make run-tests.sh usable for the dist job too



commit b0b45b05700092d8c92bc070bdaae52c7442587a
Author: Jonas Ã…dahl <jadahl gmail com>
Date:   Tue Jan 4 11:54:33 2022 +0100

    ci: Make run-tests.sh usable for the dist job too
    
    We can't just run a single 'meson' command in the script as we need to
    launch multiple long running processes inside the D-Bus session:
    
     * The meson test invokation itself
     * wireplumber
    
    This was handled for the 'test' stages, but not for the 'dist' stage,
    which as a result would fail due to wireplumber not being launched
    causing any test using pipewire to timeout.
    
    Address this by making run-tests.sh a more generic run-meson.sh that
    launches wireplumber before running the actual meson command.
    
    Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2204>

 .gitlab-ci.yml          | 5 +++--
 .gitlab-ci/run-meson.sh | 8 ++++++++
 .gitlab-ci/run-tests.sh | 8 --------
 3 files changed, 11 insertions(+), 10 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 3de180d01d..c7e2a72439 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -255,7 +255,7 @@ build-without-native-backend-and-wayland@x86_64:
   stage: test
   script:
     - dbus-run-session -- xvfb-run -a -s "$XVFB_SERVER_ARGS"
-        ./.gitlab-ci/run-tests.sh
+        ./.gitlab-ci/run-meson.sh test -C build --no-rebuild -t 10
   artifacts:
     expire_in: 1 day
     reports:
@@ -354,7 +354,8 @@ dist-mutter:
   needs:
     - build-mutter@x86_64
   script:
-    - dbus-run-session -- xvfb-run -a -s "$XVFB_SERVER_ARGS" meson dist -C build
+    - dbus-run-session -- xvfb-run -a -s "$XVFB_SERVER_ARGS"
+        ./.gitlab-ci/run-meson.sh dist -C build
   rules:
     - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
       changes:
diff --git a/.gitlab-ci/run-meson.sh b/.gitlab-ci/run-meson.sh
new file mode 100755
index 0000000000..16a20f6218
--- /dev/null
+++ b/.gitlab-ci/run-meson.sh
@@ -0,0 +1,8 @@
+#!/usr/bin/bash
+
+set -e
+
+wireplumber &
+sleep 1
+
+catchsegv meson "$@"


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