diff options
author | Junio C Hamano <gitster@pobox.com> | 2020-05-15 09:47:51 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-05-15 10:25:58 -0700 |
commit | e31600b03fc33282a6916a2c58d5795d17706947 (patch) | |
tree | 8adeddf524cc1bb026395ab6ea62093339fe5a9f /t | |
parent | Revert "ci: add a problem matcher for GitHub Actions" (diff) | |
download | tgif-e31600b03fc33282a6916a2c58d5795d17706947.tar.xz |
Revert "tests: when run in Bash, annotate test failures with file name/line number"
This reverts commit 662f9cf1548cf069cb819e9e95f224657015fcf9,
to fix the TAP output broken for bash.
Diffstat (limited to 't')
-rw-r--r-- | t/test-lib.sh | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/t/test-lib.sh b/t/test-lib.sh index 1b221951a8..d36b6ddc62 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -675,18 +675,6 @@ 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 @@ -732,7 +720,7 @@ test_failure_ () { write_junit_xml_testcase "$1" " $junit_insert" fi test_failure=$(($test_failure + 1)) - say_color error "$(file_lineno error)not ok $test_count - $1" + say_color error "not ok $test_count - $1" shift printf '%s\n' "$*" | sed -e 's/^/# /' test "$immediate" = "" || { finalize_junit_xml; GIT_EXIT_OK=t; exit 1; } |