From 1b65fedc9b8e1d15552d95d48094d5af05b3b012 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Fri, 28 Oct 2022 15:50:10 +0200 Subject: [PATCH] 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: --- .gitlab-ci.yml | 20 +++++++++++++------- .gitlab-ci/run-meson.sh | 8 -------- 2 files changed, 13 insertions(+), 15 deletions(-) delete mode 100755 .gitlab-ci/run-meson.sh diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c24c5268f..1a48077dd 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -367,11 +367,15 @@ build-without-native-backend-and-wayland@x86_64: - .test-mutter-base script: - glib-compile-schemas $GSETTINGS_SCHEMA_DIR - - dbus-run-session -- xvfb-run -a -s "$XVFB_SERVER_ARGS" - ./.gitlab-ci/run-meson.sh test -C build - --no-suite 'mutter/kvm' - --no-rebuild - --timeout-multiplier 10 + - xvfb-run -a -s "$XVFB_SERVER_ARGS" + ./src/tests/meta-dbus-runner.py + --launch=wireplumber + meson test + -C build + --setup plain + --no-suite 'mutter/kvm' + --no-rebuild + --timeout-multiplier 10 artifacts: reports: junit: "build/meson-logs/testlog.junit.xml" @@ -495,8 +499,10 @@ dist-mutter: - meson . build --werror --prefix /usr -Dbuildtype=debugoptimized - glib-compile-schemas $GSETTINGS_SCHEMA_DIR - - dbus-run-session -- xvfb-run -a -s "$XVFB_SERVER_ARGS" - ./.gitlab-ci/run-meson.sh dist -C build + - xvfb-run -a -s "$XVFB_SERVER_ARGS" + ./src/tests/meta-dbus-runner.py + --launch=wireplumber + meson 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 deleted file mode 100755 index 759117e2e..000000000 --- a/.gitlab-ci/run-meson.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/bash - -set -e - -wireplumber & -sleep 1 - -meson "$@"