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>
Patrick Steinhardt committed
Feb 19, 2026 at 07:25 UTC
4a631fee36c2e4daece9af7ff31586678bbf8dac
1 file changed
+3
-3
ci/run-test-slice.sh
+3
-3
@@ -5,9 +5,9 @@
5
6
. ${0%/*}/lib.sh
7
8
-group "Run tests" make --quiet -C t T="$(cd t &&
9
- ./helper/test-tool path-utils slice-tests "$1" "$2" t[0-9]*.sh |
10
- tr '\n' ' ')" ||
8
+TESTS=$(cd t && ./helper/test-tool path-utils slice-tests "$1" "$2" t[0-9]*.sh)
9
+
10
+group "Run tests" make --quiet -C t T="$(echo "$TESTS" | tr '\n' ' ')" ||
11
handle_failed_tests
12
13
# We only have one unit test at the moment, so run it in the first slice