diff mbox series

[v2,3/5] ci: handle TEST_OUTPUT_DIRECTORY when printing test failures

Message ID d55da77747d71e6d300ecba5fb3709fb258ef29f.1705573336.git.ps@pks.im (mailing list archive)
State Accepted
Commit 99c60edc5b83cb624b30b8f459da78c250c63f87
Headers show
Series ci: add support for macOS to GitLab CI | expand

Commit Message

Patrick Steinhardt Jan. 18, 2024, 10:22 a.m. UTC
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>
---
 ci/print-test-failures.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/ci/print-test-failures.sh b/ci/print-test-failures.sh
index c33ad4e3a2..b1f80aeac3 100755
--- a/ci/print-test-failures.sh
+++ b/ci/print-test-failures.sh
@@ -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