Browse Source

support/scripts/generate-gitlab-ci-yml: make it possible to test multiple defconfigs

Already supported:

 - Pushing a branch called "<foo>-defconfigs" tests all defconfigs.

 - Pushing a branch called "<foo>-defconfig-<defconfig-name>" will
   test one particular defconfig

This commit adds support for:

 - Pushing a branch called "<foo>-defconfigs-<pattern>" which will
   test all defconfigs whose name start with the pattern. For example
   "<foo>-defconfigs-qemu_" will test all Qemu defconfigs

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Thomas Petazzoni 3 years ago
parent
commit
65d2f04c01
1 changed files with 5 additions and 0 deletions
  1. 5 0
      support/scripts/generate-gitlab-ci-yml

+ 5 - 0
support/scripts/generate-gitlab-ci-yml

@@ -66,6 +66,11 @@ gen_tests() {
           (*-defconfigs)
           (*-defconfigs)
             do_defconfigs=base
             do_defconfigs=base
             ;;
             ;;
+	  (*-defconfigs-*)
+            pattern=$(echo ${CI_COMMIT_REF_NAME} | sed 's%[^\-]*-defconfigs-\(.*\)%\1%')
+            defconfigs=( $(cd configs; LC_ALL=C ls -1 | grep ^${pattern}) )
+            do_defconfigs=base
+            ;;
           (*-*_defconfig)
           (*-*_defconfig)
             defconfigs=( "${CI_COMMIT_REF_NAME##*-}" )
             defconfigs=( "${CI_COMMIT_REF_NAME##*-}" )
             do_defconfigs=base
             do_defconfigs=base