summaryrefslogtreecommitdiff
path: root/ci/print-test-failures.sh
diff options
context:
space:
mode:
Diffstat (limited to 'ci/print-test-failures.sh')
-rwxr-xr-xci/print-test-failures.sh22
1 files changed, 21 insertions, 1 deletions
diff --git a/ci/print-test-failures.sh b/ci/print-test-failures.sh
index d55460a212..c70d6cdbf2 100755
--- a/ci/print-test-failures.sh
+++ b/ci/print-test-failures.sh
@@ -3,7 +3,7 @@
# Print output of failing tests
#
-. ${0%/*}/lib-travisci.sh
+. ${0%/*}/lib.sh
# Tracing executed commands would produce too much noise in the loop below.
set +x
@@ -38,6 +38,26 @@ do
test_name="${TEST_EXIT%.exit}"
test_name="${test_name##*/}"
trash_dir="trash directory.$test_name"
+ case "$CI_TYPE" in
+ travis)
+ ;;
+ azure-pipelines)
+ mkdir -p failed-test-artifacts
+ mv "$trash_dir" failed-test-artifacts
+ continue
+ ;;
+ github-actions)
+ mkdir -p failed-test-artifacts
+ echo "FAILED_TEST_ARTIFACTS=t/failed-test-artifacts" >>$GITHUB_ENV
+ cp "${TEST_EXIT%.exit}.out" failed-test-artifacts/
+ tar czf failed-test-artifacts/"$test_name".trash.tar.gz "$trash_dir"
+ continue
+ ;;
+ *)
+ echo "Unhandled CI type: $CI_TYPE" >&2
+ exit 1
+ ;;
+ esac
trash_tgz_b64="trash.$test_name.base64"
if [ -d "$trash_dir" ]
then