diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2021-07-26 11:03:03 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2021-07-28 09:46:17 +1000 |
commit | 9133693b15eb8211c7b08eb2f486a88d915715f6 (patch) | |
tree | 411454b0167e400bcd0ce2cb29b8bd64bcf1d0ac /.gitlab-ci | |
parent | 6516374ded3f17986df906b650931e98730da14d (diff) | |
download | libinput-9133693b15eb8211c7b08eb2f486a88d915715f6.tar.gz |
gitlab CI: split the qemu meson build parts out as separate template
This was part of the test-suite-vm template but to make it easily
re-usable split out the parts that are just about building in a qemu
image from the parts that are specific to running the test suites.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to '.gitlab-ci')
-rw-r--r-- | .gitlab-ci/ci.template | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/.gitlab-ci/ci.template b/.gitlab-ci/ci.template index d7950913..f8a781ea 100644 --- a/.gitlab-ci/ci.template +++ b/.gitlab-ci/ci.template @@ -335,24 +335,15 @@ freebsd:11.2@container-clean: exit 1 ; fi -# Run in a test suite. Special variables: -# - SUITES: the meson test suites to run, or -# - SUITE_NAMES: all elements will be expanded to libinput-test-suite-$value -# Set one or the other, not both. -.test-suite-vm: +# Run meson and meson test in the qemu image +.build-in-qemu@template: extends: - .policy - .fdo.distribution-image@fedora - stage: test-suite tags: - kvm variables: MESON_BUILDDIR: build_dir - # remove the global --no-suite=hardware - MESON_TEST_ARGS: '' - before_script: - - if ! [[ -z $SUITE_NAMES ]]; then SUITES=$(echo $SUITE_NAMES | sed 's/\([^ ]*\)/libinput-test-suite-\1/g'); fi - - echo "Testing $SUITES" script: # start our vm, no args required - /app/vmctl start || (echo "Error - Failed to start the VM." && exit 1) @@ -389,6 +380,21 @@ freebsd:11.2@container-clean: reports: junit: $MESON_BUILDDIR/junit-*.xml + +# Run in a test suite. Special variables: +# - SUITES: the meson test suites to run, or +# - SUITE_NAMES: all elements will be expanded to libinput-test-suite-$value +# Set one or the other, not both. +.test-suite-vm: + extends: + - .build-in-qemu@template + stage: test-suite + variables: + # remove the global --no-suite=hardware + MESON_TEST_ARGS: '' + before_script: + - if ! [[ -z $SUITE_NAMES ]]; then SUITES=$(echo $SUITE_NAMES | sed 's/\([^ ]*\)/libinput-test-suite-\1/g'); fi + - echo "Testing $SUITES" retry: max: 2 when: script_failure |