From d0d2994254069bae1c5d3f99689530b2a760b872 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 12 Feb 2021 13:05:57 +1000 Subject: [PATCH] gitlab CI: add a job to make sure we're running all test suites Only needs to run when meson.build or the CI script update Signed-off-by: Peter Hutterer --- .gitlab-ci.yml | 37 +++++++++++++++++++++++++++++++++++++ .gitlab-ci/ci.template | 23 +++++++++++++++++++++++ 2 files changed, 60 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 51e1049..1ba3134 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -814,6 +814,43 @@ python-format@fedora:33: - black $(git grep -l '^#!/usr/bin/env python3') - git diff --exit-code || (echo "Please run Black against all Python files" && false) +# A job to check we're actually running all test suites in the CI +check-test-suites: + extends: + - .fedora-build@template + before_script: + - dnf install -y jq + script: + - meson builddir + - meson introspect builddir --test | jq -r '.[].name' | grep 'libinput-test-suite' | sort > meson-testsuites + - | + cat < ci-testsuites ; + libinput-test-suite-touchpad + libinput-test-suite-touchpad-tap + libinput-test-suite-touchpad-buttons + libinput-test-suite-tablet + libinput-test-suite-gestures + libinput-test-suite-device + libinput-test-suite-path + libinput-test-suite-udev + libinput-test-suite-log + libinput-test-suite-misc + libinput-test-suite-quirks + libinput-test-suite-keyboard + libinput-test-suite-pad + libinput-test-suite-switch + libinput-test-suite-trackball + libinput-test-suite-trackpoint + libinput-test-suite-totem + libinput-test-suite-touch + libinput-test-suite-pointer + EOF + - sort -o ci-testsuites ci-testsuites + - diff -u8 -w ci-testsuites meson-testsuites || (echo "Some test suites are not run in the CI" && false) + only: + changes: + - "meson.build" + - ".gitlab-ci.yml" # # coverity run diff --git a/.gitlab-ci/ci.template b/.gitlab-ci/ci.template index 058d705..52e603e 100644 --- a/.gitlab-ci/ci.template +++ b/.gitlab-ci/ci.template @@ -552,6 +552,29 @@ python-format@{{distro.name}}:{{version}}: - black $(git grep -l '^#!/usr/bin/env python3') - git diff --exit-code || (echo "Please run Black against all Python files" && false) +# A job to check we're actually running all test suites in the CI +check-test-suites: + extends: + - .{{distro.name}}-build@template + before_script: + - dnf install -y jq + script: + - meson builddir + - meson introspect builddir --test | jq -r '.[].name' | grep 'libinput-test-suite' | sort > meson-testsuites + - | + cat < ci-testsuites ; +{% for suite in test_suites %} +{% for name in suite.suites %} + libinput-test-suite-{{name}} +{% endfor %} +{% endfor %} + EOF + - sort -o ci-testsuites ci-testsuites + - diff -u8 -w ci-testsuites meson-testsuites || (echo "Some test suites are not run in the CI" && false) + only: + changes: + - "meson.build" + - ".gitlab-ci.yml" {% endfor %} # -- 2.7.4