gitlab CI: add a job to make sure we're running all test suites
authorPeter Hutterer <peter.hutterer@who-t.net>
Fri, 12 Feb 2021 03:05:57 +0000 (13:05 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Fri, 12 Feb 2021 05:24:15 +0000 (15:24 +1000)
Only needs to run when meson.build or the CI script update

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
.gitlab-ci.yml
.gitlab-ci/ci.template

index 51e1049..1ba3134 100644 (file)
@@ -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 <<EOF > 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
index 058d705..52e603e 100644 (file)
@@ -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 <<EOF > 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 %}
 
 #