]> git.ipfire.org Git - thirdparty/git.git/commitdiff
ci: handle TEST_OUTPUT_DIRECTORY when printing test failures
authorPatrick Steinhardt <ps@pks.im>
Thu, 18 Jan 2024 10:22:53 +0000 (11:22 +0100)
committerJunio C Hamano <gitster@pobox.com>
Thu, 18 Jan 2024 19:53:17 +0000 (11:53 -0800)
The TEST_OUTPUT_DIRECTORY environment variable can be used to instruct
the test suite to write test data and test results into a different
location than into "t/". The "ci/print-test-failures.sh" script does not
know to handle this environment variable though, which means that it
will search for test results in the wrong location if it was set.

Update the script to handle TEST_OUTPUT_DIRECTORY so that we can start
to set it in our CI.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
ci/print-test-failures.sh

index c33ad4e3a2220a97f6e0708afe915010f4f44561..b1f80aeac345dd70746b02b6ca1b5282a0c2a4aa 100755 (executable)
@@ -8,7 +8,7 @@
 # Tracing executed commands would produce too much noise in the loop below.
 set +x
 
-cd t/
+cd "${TEST_OUTPUT_DIRECTORY:-t/}"
 
 if ! ls test-results/*.exit >/dev/null 2>/dev/null
 then