ci: Only launch a single mocked D-Bus environment for all tests

This cuts away a lot of time wasted on spawning and tearing down D-Bus
daemons and mocked service for every test case.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2678>
This commit is contained in:
Jonas Ådahl 2022-10-28 15:50:10 +02:00 committed by Marge Bot
parent ec18a1d7ae
commit 1b65fedc9b
2 changed files with 13 additions and 15 deletions

View File

@ -367,11 +367,15 @@ build-without-native-backend-and-wayland@x86_64:
- .test-mutter-base - .test-mutter-base
script: script:
- glib-compile-schemas $GSETTINGS_SCHEMA_DIR - glib-compile-schemas $GSETTINGS_SCHEMA_DIR
- dbus-run-session -- xvfb-run -a -s "$XVFB_SERVER_ARGS" - xvfb-run -a -s "$XVFB_SERVER_ARGS"
./.gitlab-ci/run-meson.sh test -C build ./src/tests/meta-dbus-runner.py
--no-suite 'mutter/kvm' --launch=wireplumber
--no-rebuild meson test
--timeout-multiplier 10 -C build
--setup plain
--no-suite 'mutter/kvm'
--no-rebuild
--timeout-multiplier 10
artifacts: artifacts:
reports: reports:
junit: "build/meson-logs/testlog.junit.xml" junit: "build/meson-logs/testlog.junit.xml"
@ -495,8 +499,10 @@ dist-mutter:
- meson . build --werror --prefix /usr - meson . build --werror --prefix /usr
-Dbuildtype=debugoptimized -Dbuildtype=debugoptimized
- glib-compile-schemas $GSETTINGS_SCHEMA_DIR - glib-compile-schemas $GSETTINGS_SCHEMA_DIR
- dbus-run-session -- xvfb-run -a -s "$XVFB_SERVER_ARGS" - xvfb-run -a -s "$XVFB_SERVER_ARGS"
./.gitlab-ci/run-meson.sh dist -C build ./src/tests/meta-dbus-runner.py
--launch=wireplumber
meson dist -C build
rules: rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"' - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
changes: changes:

View File

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