[Buildroot] [PATCH 07/10] gitlab-ci: handle single runtime test in script

Yann E. MORIN yann.morin.1998 at free.fr
Sun Sep 6 20:12:26 UTC 2020


Signed-off-by: Yann E. MORIN <yann.morin.1998 at free.fr>
Cc: Romain Naour <romain.naour at gmail.com>
Cc: Thomas Petazzoni <thomas.petazzoni at bootlin.com>
Cc: Arnout Vandecappelle <arnout at mind.be>
---
 support/misc/gitlab-ci.yml.in          | 9 ---------
 support/scripts/generate-gitlab-ci-yml | 8 +++++++-
 2 files changed, 7 insertions(+), 10 deletions(-)

diff --git a/support/misc/gitlab-ci.yml.in b/support/misc/gitlab-ci.yml.in
index 8a94b872f3..0f93d272be 100644
--- a/support/misc/gitlab-ci.yml.in
+++ b/support/misc/gitlab-ci.yml.in
@@ -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')
diff --git a/support/scripts/generate-gitlab-ci-yml b/support/scripts/generate-gitlab-ci-yml
index 52bec05a53..51e1625faa 100755
--- a/support/scripts/generate-gitlab-ci-yml
+++ b/support/scripts/generate-gitlab-ci-yml
@@ -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
-- 
2.20.1



More information about the buildroot mailing list