mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-09-26 12:00:48 -09:00
support/scripts/generate-gitlab-ci-yml: allow multiple tests in one pipeline
The current Gitlab CI mechanism allows to trigger all tests in a CI pipeline by pushing a branch named <something>-runtime-tests, or to trigger a single test in a CI pipeline by pushing a branch name <something>-tests.<name of test>. However, there are cases where it is useful to run a suite of tests, for example to run all tests in tests.init.test_busybox. This commit makes that possible by extending the current semantic of <something>-tests.<name of test> to not expect a complete test name, but instead to accept all tests that starts with the given pattern. This allows to do: git push gitlab HEAD:foobar-tests.init.test_busybox.TestInitSystemBusyboxRo like it was the case before. But it now also allows to do: git push gitlab HEAD:foobar-tests.init.test_busybox to run all Busybox tests. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
This commit is contained in:
committed by
Arnout Vandecappelle (Essensium/Mind)
parent
df58675b06
commit
23186356a1
@@ -71,7 +71,11 @@ gen_tests() {
|
||||
do_runtime=true
|
||||
;;
|
||||
(*-tests.*)
|
||||
runtimes=( "${CI_COMMIT_REF_NAME##*-}" )
|
||||
runtimes=( $(./support/testing/run-tests -l 2>&1 \
|
||||
| sed -r -e '/^test_run \((.*)\).*/!d; s//\1/' \
|
||||
| LC_ALL=C sort \
|
||||
| grep "^${CI_COMMIT_REF_NAME##*-}")
|
||||
)
|
||||
do_runtime=true
|
||||
;;
|
||||
esac
|
||||
|
||||
Reference in New Issue
Block a user