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>
This commit is contained in:
Jonas Ådahl 2022-01-04 11:54:33 +01:00
parent 9e9f3a0330
commit b0b45b0570
3 changed files with 11 additions and 10 deletions

View File

@ -255,7 +255,7 @@ build-without-native-backend-and-wayland@x86_64:
stage: test stage: test
script: script:
- dbus-run-session -- xvfb-run -a -s "$XVFB_SERVER_ARGS" - 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: artifacts:
expire_in: 1 day expire_in: 1 day
reports: reports:
@ -354,7 +354,8 @@ dist-mutter:
needs: needs:
- build-mutter@x86_64 - build-mutter@x86_64
script: 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: rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"' - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
changes: changes:

8
.gitlab-ci/run-meson.sh Executable file
View File

@ -0,0 +1,8 @@
#!/usr/bin/bash
set -e
wireplumber &
sleep 1
catchsegv meson "$@"

View File

@ -1,8 +0,0 @@
#!/usr/bin/bash
set -e
wireplumber &
sleep 1
catchsegv meson test -C build --no-rebuild -t 10