diff options
author | Junio C Hamano <gitster@pobox.com> | 2020-04-29 16:15:29 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-04-29 16:15:29 -0700 |
commit | 8cb514d1cbaf7b8adfc92e348a1706acc62fabdb (patch) | |
tree | f7a8bbb625ee8cc56a29911da17c73e8d79c8e95 /t | |
parent | Merge branch 'dd/ci-musl-libc' (diff) | |
parent | ci: let GitHub Actions upload failed tests' directories (diff) | |
download | tgif-8cb514d1cbaf7b8adfc92e348a1706acc62fabdb.tar.xz |
Merge branch 'dd/ci-swap-azure-pipelines-with-github-actions'
Update the CI configuration to use GitHub Actions, retiring the one
based on Azure Pipelines.
* dd/ci-swap-azure-pipelines-with-github-actions:
ci: let GitHub Actions upload failed tests' directories
ci: add a problem matcher for GitHub Actions
tests: when run in Bash, annotate test failures with file name/line number
ci: retire the Azure Pipelines definition
README: add a build badge for the GitHub Actions runs
ci: configure GitHub Actions for CI/PR
ci: run gem with sudo to install asciidoctor
ci: explicit install all required packages
ci: fix the `jobname` of the `GETTEXT_POISON` job
ci/lib: set TERM environment variable if not exist
ci/lib: allow running in GitHub Actions
ci/lib: if CI type is unknown, show the environment variables
Diffstat (limited to 't')
-rw-r--r-- | t/test-lib.sh | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/t/test-lib.sh b/t/test-lib.sh index 0bb1105ec3..13ba00d508 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -675,6 +675,18 @@ die () { fi } +file_lineno () { + test -z "$GIT_TEST_FRAMEWORK_SELFTEST" && test -n "$BASH" || return 0 + local i + for i in ${!BASH_SOURCE[*]} + do + case $i,"${BASH_SOURCE[$i]##*/}" in + 0,t[0-9]*.sh) echo "t/${BASH_SOURCE[$i]}:$LINENO: ${1+$1: }"; return;; + *,t[0-9]*.sh) echo "t/${BASH_SOURCE[$i]}:${BASH_LINENO[$(($i-1))]}: ${1+$1: }"; return;; + esac + done +} + GIT_EXIT_OK= trap 'die' EXIT # Disable '-x' tracing, because with some shells, notably dash, it @@ -720,7 +732,7 @@ test_failure_ () { write_junit_xml_testcase "$1" " $junit_insert" fi test_failure=$(($test_failure + 1)) - say_color error "not ok $test_count - $1" + say_color error "$(file_lineno error)not ok $test_count - $1" shift printf '%s\n' "$*" | sed -e 's/^/# /' test "$immediate" = "" || { finalize_junit_xml; GIT_EXIT_OK=t; exit 1; } |