summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2022-06-17 10:33:32 -0700
committerJunio C Hamano <gitster@pobox.com>2022-06-17 10:33:32 -0700
commitd0d96b8280faf7c22c115374732f50972689c0d2 (patch)
tree9288910e85e9091dc92ab0bdebac0cd0125932de
parente870c5857fbd67a7015b8c5539293bcb5d8e8ff5 (diff)
parentcadcafc3311de7f6fae5f3add10cde4f93268ff8 (diff)
downloadgit-d0d96b8280faf7c22c115374732f50972689c0d2.tar.gz
Merge branch 'js/ci-github-workflow-markup'
Recent CI update hides certain failures in test jobs, which has been corrected. * js/ci-github-workflow-markup: ci(github): also mark up compile errors ci(github): use grouping also in the `win-build` job ci(github): bring back the 'print test failures' step
-rw-r--r--.github/workflows/main.yml16
-rwxr-xr-xci/lib.sh13
-rwxr-xr-xci/make-test-artifacts.sh2
3 files changed, 27 insertions, 4 deletions
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 3fa88b78b6..cd1f52692a 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -119,6 +119,10 @@ jobs:
- name: test
shell: bash
run: . /etc/profile && ci/run-test-slice.sh ${{matrix.nr}} 10
+ - name: print test failures
+ if: failure() && env.FAILED_TEST_ARTIFACTS != ''
+ shell: bash
+ run: ci/print-test-failures.sh
- name: Upload failed tests' directories
if: failure() && env.FAILED_TEST_ARTIFACTS != ''
uses: actions/upload-artifact@v2
@@ -200,6 +204,10 @@ jobs:
env:
NO_SVN_TESTS: 1
run: . /etc/profile && ci/run-test-slice.sh ${{matrix.nr}} 10
+ - name: print test failures
+ if: failure() && env.FAILED_TEST_ARTIFACTS != ''
+ shell: bash
+ run: ci/print-test-failures.sh
- name: Upload failed tests' directories
if: failure() && env.FAILED_TEST_ARTIFACTS != ''
uses: actions/upload-artifact@v2
@@ -253,6 +261,10 @@ jobs:
- uses: actions/checkout@v2
- run: ci/install-dependencies.sh
- run: ci/run-build-and-tests.sh
+ - name: print test failures
+ if: failure() && env.FAILED_TEST_ARTIFACTS != ''
+ shell: bash
+ run: ci/print-test-failures.sh
- name: Upload failed tests' directories
if: failure() && env.FAILED_TEST_ARTIFACTS != ''
uses: actions/upload-artifact@v2
@@ -282,6 +294,10 @@ jobs:
- uses: actions/checkout@v1
- run: ci/install-docker-dependencies.sh
- run: ci/run-build-and-tests.sh
+ - name: print test failures
+ if: failure() && env.FAILED_TEST_ARTIFACTS != ''
+ shell: bash
+ run: ci/print-test-failures.sh
- name: Upload failed tests' directories
if: failure() && env.FAILED_TEST_ARTIFACTS != ''
uses: actions/upload-artifact@v1
diff --git a/ci/lib.sh b/ci/lib.sh
index 2f6d9d26e4..f095519f8d 100755
--- a/ci/lib.sh
+++ b/ci/lib.sh
@@ -29,8 +29,14 @@ else
set +x
begin_group "$1"
shift
- "$@"
- res=$?
+ # work around `dash` not supporting `set -o pipefail`
+ (
+ "$@" 2>&1
+ echo $? >exit.status
+ ) |
+ sed 's/^\(\([^ ]*\):\([0-9]*\):\([0-9]*:\) \)\(error\|warning\): /::\5 file=\2,line=\3::\1/'
+ res=$(cat exit.status)
+ rm exit.status
end_group
return $res
}
@@ -177,7 +183,8 @@ then
test_name="${test_exit%.exit}"
test_name="${test_name##*/}"
printf "\\e[33m\\e[1m=== Failed test: ${test_name} ===\\e[m\\n"
- echo "The full logs are in the artifacts attached to this run."
+ echo "The full logs are in the 'print test failures' step below."
+ echo "See also the 'failed-tests-*' artifacts attached to this run."
cat "t/test-results/$test_name.markup"
trash_dir="t/trash directory.$test_name"
diff --git a/ci/make-test-artifacts.sh b/ci/make-test-artifacts.sh
index 646967481f..74141af0cc 100755
--- a/ci/make-test-artifacts.sh
+++ b/ci/make-test-artifacts.sh
@@ -7,6 +7,6 @@ mkdir -p "$1" # in case ci/lib.sh decides to quit early
. ${0%/*}/lib.sh
-make artifacts-tar ARTIFACTS_DIRECTORY="$1"
+group Build make artifacts-tar ARTIFACTS_DIRECTORY="$1"
check_unignored_build_artifacts