diff options
| author | Patrick Steinhardt <ps@pks.im> | 2026-02-19 07:25:27 +0100 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2026-02-19 10:22:30 -0800 |
| commit | 4a631fee36c2e4daece9af7ff31586678bbf8dac (patch) | |
| tree | 63197c06b4c3ac0d3e769cbc8ca2a6dc597f0cc3 | |
| parent | 67ad42147a7acc2af6074753ebd03d904476118f (diff) | |
| download | git-4a631fee36c2e4daece9af7ff31586678bbf8dac.tar.xz | |
ci: handle failures of test-slice helper
The "run-test-slice.sh" script executes the test helper to slice up
tests passed to it. As the execution is part of a pipe though, we end up
ignoring any potential error code returned by the helper.
Make the code more robust by storing the tests in a variable first so
that we can split up the pipeline.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
| -rwxr-xr-x | ci/run-test-slice.sh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ci/run-test-slice.sh b/ci/run-test-slice.sh index 0444c79c02..ff948e397f 100755 --- a/ci/run-test-slice.sh +++ b/ci/run-test-slice.sh @@ -5,9 +5,9 @@ . ${0%/*}/lib.sh -group "Run tests" make --quiet -C t T="$(cd t && - ./helper/test-tool path-utils slice-tests "$1" "$2" t[0-9]*.sh | - tr '\n' ' ')" || +TESTS=$(cd t && ./helper/test-tool path-utils slice-tests "$1" "$2" t[0-9]*.sh) + +group "Run tests" make --quiet -C t T="$(echo "$TESTS" | tr '\n' ' ')" || handle_failed_tests # We only have one unit test at the moment, so run it in the first slice |
