diff --git a/support/scripts/generate-gitlab-ci-yml b/support/scripts/generate-gitlab-ci-yml index 5cef1146e2..51f7de21dd 100755 --- a/support/scripts/generate-gitlab-ci-yml +++ b/support/scripts/generate-gitlab-ci-yml @@ -2,16 +2,20 @@ set -e set -o pipefail -input="${1}" +main() { + local template="${1}" -cat "${input}" + cat "${template}" -( - cd configs - LC_ALL=C ls -1 *_defconfig -) \ + ( + cd configs + LC_ALL=C ls -1 *_defconfig + ) \ | sed -r -e 's/^(.+)$/\1: { extends: .defconfig }\n\1_check: { extends: .defconfig_check }/' -./support/testing/run-tests -l 2>&1 \ + ./support/testing/run-tests -l 2>&1 \ | sed -r -e '/^test_run \((.*)\).*/!d; s//\1: { extends: .runtime_test }/' \ | LC_ALL=C sort +} + +main "${@}"