diff --git a/docs/manual/contribute.txt b/docs/manual/contribute.txt index bf3d5a7075..36512c0ee3 100644 --- a/docs/manual/contribute.txt +++ b/docs/manual/contribute.txt @@ -677,9 +677,23 @@ string you choose to identify this specific job being created. $ git push gitlab HEAD:-runtime-tests --------------------- -* to trigger one test case job, a specific branch naming string is used that -includes the full test case name. +* to trigger one or several test case jobs, a specific branch naming +string is used that includes either the full test case name, or the +beginning of a series of tests to run: --------------------- $ git push gitlab HEAD:- --------------------- + +Example to run one test: + +--------------------- + $ git push gitlab HEAD:foo-tests.init.test_busybox.TestInitSystemBusyboxRo +--------------------- + +Examples to run several tests part of the same group: + +--------------------- + $ git push gitlab HEAD:foo-tests.init.test_busybox + $ git push gitlab HEAD:foo-tests.init +--------------------- diff --git a/support/scripts/generate-gitlab-ci-yml b/support/scripts/generate-gitlab-ci-yml index 3f498e08fd..69c3fb275f 100755 --- a/support/scripts/generate-gitlab-ci-yml +++ b/support/scripts/generate-gitlab-ci-yml @@ -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