From 65d2f04c012af492a9b9da04dfa3b3cbd20347f1 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Wed, 29 Dec 2021 15:38:42 +0100 Subject: [PATCH] support/scripts/generate-gitlab-ci-yml: make it possible to test multiple defconfigs Already supported: - Pushing a branch called "-defconfigs" tests all defconfigs. - Pushing a branch called "-defconfig-" will test one particular defconfig This commit adds support for: - Pushing a branch called "-defconfigs-" which will test all defconfigs whose name start with the pattern. For example "-defconfigs-qemu_" will test all Qemu defconfigs Signed-off-by: Thomas Petazzoni Signed-off-by: Yann E. MORIN --- support/scripts/generate-gitlab-ci-yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/support/scripts/generate-gitlab-ci-yml b/support/scripts/generate-gitlab-ci-yml index 8aaa456b03..3e0c68091b 100755 --- a/support/scripts/generate-gitlab-ci-yml +++ b/support/scripts/generate-gitlab-ci-yml @@ -66,6 +66,11 @@ gen_tests() { (*-defconfigs) 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) defconfigs=( "${CI_COMMIT_REF_NAME##*-}" ) do_defconfigs=base