소스 검색

gitlab-ci: handle single runtime test in script

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>
Yann E. MORIN 4 년 전
부모
커밋
0b7873bc82
2개의 변경된 파일7개의 추가작업 그리고 10개의 파일을 삭제
  1. 0 9
      support/misc/gitlab-ci.yml.in
  2. 7 1
      support/scripts/generate-gitlab-ci-yml

+ 0 - 9
support/misc/gitlab-ci.yml.in

@@ -82,15 +82,6 @@ check-package:
             - test-output/*.log
             - test-output/*.log
             - test-output/*/.config
             - test-output/*/.config
             - test-output/*/images/*
             - test-output/*/images/*
-
-.runtime_test:
-    extends: .runtime_test_base
     before_script:
     before_script:
         - TEST_CASE_NAME=${CI_JOB_NAME}
         - 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')

+ 7 - 1
support/scripts/generate-gitlab-ci-yml

@@ -78,7 +78,13 @@ gen_tests() {
     fi
     fi
     case "${CI_COMMIT_REF_NAME}" in
     case "${CI_COMMIT_REF_NAME}" in
         # For the branch or tag name named *-runtime-tests, create a pipeline.
         # 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
     esac
 
 
     if ${run_tests}; then
     if ${run_tests}; then