gitlab-ci: handle single runtime test in script
authorYann E. MORIN <yann.morin.1998@free.fr>
Sun, 6 Sep 2020 20:12:26 +0000 (22:12 +0200)
committerYann E. MORIN <yann.morin.1998@free.fr>
Wed, 9 Sep 2020 07:25:51 +0000 (09:25 +0200)
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Romain Naour <romain.naour@gmail.com>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Cc: Arnout Vandecappelle <arnout@mind.be>
Reviewed-by: Romain Naour <romain.naour@gmail.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
support/misc/gitlab-ci.yml.in
support/scripts/generate-gitlab-ci-yml

index 8a94b872f33339d55f27ca72a132f814dc7001cc..0f93d272be864854f006c0bdbfae42a3a31573b7 100644 (file)
@@ -82,15 +82,6 @@ check-package:
             - test-output/*.log
             - test-output/*/.config
             - test-output/*/images/*
-
-.runtime_test:
-    extends: .runtime_test_base
     before_script:
         - TEST_CASE_NAME=${CI_JOB_NAME}
 
-one-runtime_test:
-    extends: .runtime_test_base
-    rules:
-        - if: '$CI_COMMIT_REF_NAME =~ /^.*-tests\..*$/'
-    before_script:
-        - TEST_CASE_NAME=$(echo ${CI_COMMIT_REF_NAME} | sed -e 's,^.*-,,g')
index 39e0fc7283cad59039435b738ba59b0f1936356f..25fecf37156ff7c0b1f123ccf40173e581738cfa 100755 (executable)
@@ -78,7 +78,13 @@ gen_tests() {
     fi
     case "${CI_COMMIT_REF_NAME}" in
         # For the branch or tag name named *-runtime-tests, create a pipeline.
-        (*-runtime-tests) run_tests=true;;
+        (*-runtime-tests)
+            run_tests=true
+        ;;
+        (*-tests.*)
+            tests=( "${CI_COMMIT_REF_NAME##*-}" )
+            run_tests=true
+        ;;
     esac
 
     if ${run_tests}; then