diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2020-02-20 12:08:48 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2020-02-20 13:38:46 +1000 |
commit | 90888ab9f23963a08f39121ceb8d0c769469e8a0 (patch) | |
tree | da9fa7834f6bbe39669025dcdc351fc612be158c | |
parent | f5506d1f22c9147e09a331f956df7249da0fbca3 (diff) | |
download | libinput-90888ab9f23963a08f39121ceb8d0c769469e8a0.tar.gz |
gitlab CI: generate the VM tests through the templates as well
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r-- | .gitlab-ci.yml | 4 | ||||
-rwxr-xr-x | .gitlab-ci/generate-gitlab-ci.py | 14 | ||||
-rw-r--r-- | .gitlab-ci/gitlab-ci.tmpl | 77 |
3 files changed, 23 insertions, 72 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e59c4a5d..787cc3bc 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -553,7 +553,6 @@ freebsd:11.2@container-clean: when: script_failure needs: ['fedora:30@qemu-prep'] -# in reverse order of duration to get the slowest ones started first fedora:30@vm-touchpad: extends: - .fedora:30@test-suite-vm @@ -590,6 +589,7 @@ fedora:30@vm-pointer: variables: SUITE_NAMES: 'pointer' + fedora:30@valgrind-touchpad: stage: valgrind extends: @@ -618,7 +618,6 @@ fedora:30@valgrind-gestures-device: variables: MESON_TEST_ARGS: '--setup=valgrind' - fedora:30@valgrind-others: stage: valgrind extends: @@ -633,6 +632,7 @@ fedora:30@valgrind-pointer: variables: MESON_TEST_ARGS: '--setup=valgrind' + .fedora-build@template: extends: - .build@template diff --git a/.gitlab-ci/generate-gitlab-ci.py b/.gitlab-ci/generate-gitlab-ci.py index 5c382b9b..e8be754f 100755 --- a/.gitlab-ci/generate-gitlab-ci.py +++ b/.gitlab-ci/generate-gitlab-ci.py @@ -15,13 +15,25 @@ distributions = [ {'name': 'alpine', 'version': 'latest'}, ] +# in reverse order of duration to get the slowest ones started first +test_suites = [ + {'name': 'touchpad', 'suites': 'touchpad'}, + {'name': 'tap', 'suites': 'tap'}, + {'name': 'tablet', 'suites': 'tablet'}, + {'name': 'gestures-device', 'suites': 'gestures device'}, + {'name': 'others', + 'suites': 'context config misc events totem udev lid log timer tablet-mode quirks trackball pad path keyboard switch touch trackpoint'}, + {'name': 'pointer', 'suites': 'pointer'} +] + def generate_template(): env = jinja2.Environment(loader=jinja2.FileSystemLoader('./.gitlab-ci'), trim_blocks=True, lstrip_blocks=True) template = env.get_template('gitlab-ci.tmpl') - config = {'distributions': distributions} + config = {'distributions': distributions, + 'test_suites': test_suites} with open('.gitlab-ci.yml', 'w') as fd: template.stream(config).dump(fd) diff --git a/.gitlab-ci/gitlab-ci.tmpl b/.gitlab-ci/gitlab-ci.tmpl index cb0aad28..529e82f3 100644 --- a/.gitlab-ci/gitlab-ci.tmpl +++ b/.gitlab-ci/gitlab-ci.tmpl @@ -442,85 +442,24 @@ freebsd:11.2@container-clean: when: script_failure needs: ['fedora:30@qemu-prep'] -# in reverse order of duration to get the slowest ones started first -fedora:30@vm-touchpad: +{% for suite in test_suites %} +fedora:30@vm-{{suite.name}}: extends: - .fedora:30@test-suite-vm variables: - SUITE_NAMES: 'touchpad' - -fedora:30@vm-tap: - extends: - - .fedora:30@test-suite-vm - variables: - SUITE_NAMES: 'tap' - -fedora:30@vm-tablet: - extends: - - .fedora:30@test-suite-vm - variables: - SUITE_NAMES: 'tablet' - -fedora:30@vm-gestures-device: - extends: - - .fedora:30@test-suite-vm - variables: - SUITE_NAMES: 'gestures device' - -fedora:30@vm-others: - extends: - - .fedora:30@test-suite-vm - variables: - SUITE_NAMES: 'context config misc events totem udev lid log timer tablet-mode quirks trackball pad path keyboard switch touch trackpoint' - -fedora:30@vm-pointer: - extends: - - .fedora:30@test-suite-vm - variables: - SUITE_NAMES: 'pointer' - -fedora:30@valgrind-touchpad: - stage: valgrind - extends: - - fedora:30@vm-touchpad - variables: - MESON_TEST_ARGS: '--setup=valgrind' - -fedora:30@valgrind-tap: - stage: valgrind - extends: - - fedora:30@vm-tap - variables: - MESON_TEST_ARGS: '--setup=valgrind' - -fedora:30@valgrind-tablet: - stage: valgrind - extends: - - fedora:30@vm-tablet - variables: - MESON_TEST_ARGS: '--setup=valgrind' - -fedora:30@valgrind-gestures-device: - stage: valgrind - extends: - - fedora:30@vm-gestures-device - variables: - MESON_TEST_ARGS: '--setup=valgrind' + SUITE_NAMES: '{{suite.suites}}' +{% endfor %} -fedora:30@valgrind-others: +{% for suite in test_suites %} +fedora:30@valgrind-{{suite.name}}: stage: valgrind extends: - - fedora:30@vm-others + - fedora:30@vm-{{suite.name}} variables: MESON_TEST_ARGS: '--setup=valgrind' -fedora:30@valgrind-pointer: - stage: valgrind - extends: - - fedora:30@vm-pointer - variables: - MESON_TEST_ARGS: '--setup=valgrind' +{% endfor %} .fedora-build@template: extends: |