From b0b45b05700092d8c92bc070bdaae52c7442587a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Tue, 4 Jan 2022 11:54:33 +0100 Subject: [PATCH] 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: --- .gitlab-ci.yml | 5 +++-- .gitlab-ci/run-meson.sh | 8 ++++++++ .gitlab-ci/run-tests.sh | 8 -------- 3 files changed, 11 insertions(+), 10 deletions(-) create mode 100755 .gitlab-ci/run-meson.sh delete mode 100755 .gitlab-ci/run-tests.sh diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3de180d01..c7e2a7243 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 000000000..16a20f621 --- /dev/null +++ b/.gitlab-ci/run-meson.sh @@ -0,0 +1,8 @@ +#!/usr/bin/bash + +set -e + +wireplumber & +sleep 1 + +catchsegv meson "$@" diff --git a/.gitlab-ci/run-tests.sh b/.gitlab-ci/run-tests.sh deleted file mode 100755 index fb72df251..000000000 --- a/.gitlab-ci/run-tests.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/bash - -set -e - -wireplumber & -sleep 1 - -catchsegv meson test -C build --no-rebuild -t 10