diff options
author | Florian Müllner <fmuellner@gnome.org> | 2021-08-31 19:08:27 +0200 |
---|---|---|
committer | Florian Müllner <fmuellner@gnome.org> | 2021-09-05 00:15:56 +0200 |
commit | 4bbe61d47e3a5bc79c02cd442722c61c722b8647 (patch) | |
tree | f0c53d54da9bea64bb013bf494548726a41a8d33 | |
parent | f41b165f9c62c82ec6aab02d49082c2db5b2ea2e (diff) | |
download | mutter-4bbe61d47e3a5bc79c02cd442722c61c722b8647.tar.gz |
ci: Move test setup into template job
This will allow sharing the setup between test jobs and a future
dist job.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1980>
-rw-r--r-- | .gitlab-ci.yml | 25 | ||||
-rwxr-xr-x | .gitlab-ci/run-tests.sh | 20 |
2 files changed, 19 insertions, 26 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4e361c31a..fd876cd9f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -230,19 +230,32 @@ build-without-native-backend-and-wayland@x86_64: paths: - build/meson-logs -.test-mutter: - extends: - - .fdo.distribution-image@fedora - stage: test +.test-setup: &test-setup variables: XDG_RUNTIME_DIR: "$CI_PROJECT_DIR/runtime-dir" GSETTINGS_SCHEMA_DIR: "$CI_PROJECT_DIR/build/data" + MUTTER_DEBUG_DUMMY_MODE_SPECS: "800x600@10.0" + PIPEWIRE_DEBUG: 2 + PIPEWIRE_LOG: "$CI_PROJECT_DIR/build/meson-logs/pipewire.log" + XVFB_SERVER_ARGS: "+iglx -noreset" G_SLICE: "always-malloc" MALLOC_CHECK_: "3" NO_AT_BRIDGE: "1" - script: + before_script: + - glib-compile-schemas $GSETTINGS_SCHEMA_DIR + # Disable e.g. audio support to not dead lock screen cast tests + - rm -f /usr/share/pipewire/media-session.d/with-* - mkdir -m 700 $XDG_RUNTIME_DIR - - dbus-run-session -- bash -x ./.gitlab-ci/run-tests.sh + - pipewire & sleep 2 + +.test-mutter: + extends: + - .fdo.distribution-image@fedora + <<: *test-setup + stage: test + script: + - dbus-run-session -- xvfb-run -a -s "$XVFB_SERVER_ARGS" + catchsegv meson test -C build --no-rebuild -t 10 artifacts: expire_in: 1 day reports: diff --git a/.gitlab-ci/run-tests.sh b/.gitlab-ci/run-tests.sh deleted file mode 100755 index 80a84eb55..000000000 --- a/.gitlab-ci/run-tests.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/bash - -set -e - -dconf update -glib-compile-schemas $GSETTINGS_SCHEMA_DIR - -# Disable e.g. audio support to not dead lock screen cast tests -rm -f /usr/share/pipewire/media-session.d/with-* - -PIPEWIRE_DEBUG=2 PIPEWIRE_LOG="$CI_PROJECT_DIR/build/meson-logs/pipewire.log" \ - pipewire & - -sleep 2 - -meson test -C build --no-rebuild --setup CI - -exit_code=$? - -exit $exit_code |