gitlab/ci_template: run valgrind tests automatically
authorTim-Philipp Müller <tim@centricular.com>
Thu, 21 Mar 2019 21:39:03 +0000 (21:39 +0000)
committerTim-Philipp Müller <tim@centricular.com>
Mon, 25 Mar 2019 17:31:44 +0000 (17:31 +0000)
Don't valgrind everything for all changes though,
but only those modules most likely to be affected
by changes in the current ci project. So, valgrind

 - gstreamer only for gstreamer core changes
 - gst-plugins-base for core/base changes
 - gst-plugins-good for core/base/good changes
 - gst-plugins-ugly for core/base/ugly changes
 - gst-plugins-bad for core/base/good changes

In other words: don't valgrind core/base if it's
good/bad/ugly that's being changed, for example.
Don't valgrind -good or -ugly for changes in -bad,
etc.

Meaning:

 - for changes in core, valgrind core/base/good/ugly/bad
 - for changes in base, valgrind base/good/ugly/bad
 - for changes in good, valgrind good/bad
 - for changes in ugly, valgrind ugly
 - for changes in bad, valgrind bad

More modules to be added later once they're valgrind
clean on the CI.

https://gitlab.freedesktop.org/gstreamer/gst-ci/merge_requests/80

gitlab/ci_template.yml

index 99e77df..61bb998 100644 (file)
@@ -262,8 +262,7 @@ check fedora:
 # Valgrind
 .valgrind fedora x86_64:
   extends: '.test fedora x86_64'
-  stage: test
-  when: manual
+  stage: 'full tests'
   variables:
     SUPPRESSION_FILES: >
       gst-build/subprojects/gstreamer/tests/check/gstreamer.supp
@@ -390,26 +389,41 @@ valgrind core:
   extends: '.valgrind fedora x86_64'
   variables:
     TEST_SUITE: "check.gstreamer\\..*"
+  only:
+    variables:
+      - $CI_PROJECT_NAME == "gstreamer"
 
 valgrind base:
   extends: '.valgrind fedora x86_64'
   variables:
     TEST_SUITE: "check.gst-plugins-base\\..*"
+  only:
+    variables:
+      - $CI_PROJECT_NAME =~ /^(gstreamer|gst-plugins-base)$/
 
 valgrind good:
   extends: '.valgrind fedora x86_64'
   variables:
     TEST_SUITE: "check.gst-plugins-good\\..*"
+  only:
+    variables:
+      - $CI_PROJECT_NAME =~ /^(gstreamer|gst-plugins-base|gst-plugins-good)$/
 
 valgrind ugly:
   extends: '.valgrind fedora x86_64'
   variables:
     TEST_SUITE: "check.gst-plugins-ugly\\..*"
+  only:
+    variables:
+      - $CI_PROJECT_NAME =~ /^(gstreamer|gst-plugins-base|gst-plugins-ugly)$/
 
 valgrind bad:
   extends: '.valgrind fedora x86_64'
   variables:
     TEST_SUITE: "check.gst-plugins-bad\\..*"
+  only:
+    variables:
+      - $CI_PROJECT_NAME =~ /^(gstreamer|gst-plugins-base|gst-plugins-good|gst-plugins-bad)$/
 
 
 # Template for Cerbero GStreamer Build