diff options
| author | Junio C Hamano <gitster@pobox.com> | 2020-05-20 08:33:29 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2020-05-20 08:33:29 -0700 |
| commit | 972ce8561d6d332b5f794ead27cd0ae476d7fc88 (patch) | |
| tree | 69b634b2f63a7ff2192a9fc6fb86efa9a90e5d6d | |
| parent | fde4622c0866af528e6f2c4e6bb68d83b13695bf (diff) | |
| parent | e31600b03fc33282a6916a2c58d5795d17706947 (diff) | |
| download | git-972ce8561d6d332b5f794ead27cd0ae476d7fc88.tar.gz | |
Merge branch 'jc/fix-tap-output-under-bash'
A recent attempt to make the test output nicer to view on CI
systems broke TAP output under bash. The effort has been reverted
to be re-attempted in the next cycle.
* jc/fix-tap-output-under-bash:
Revert "tests: when run in Bash, annotate test failures with file name/line number"
Revert "ci: add a problem matcher for GitHub Actions"
Revert "t/test_lib: avoid naked bash arrays in file_lineno"
| -rw-r--r-- | ci/git-problem-matcher.json | 16 | ||||
| -rwxr-xr-x | ci/lib.sh | 5 | ||||
| -rw-r--r-- | t/test-lib.sh | 16 |
3 files changed, 1 insertions, 36 deletions
diff --git a/ci/git-problem-matcher.json b/ci/git-problem-matcher.json deleted file mode 100644 index 506dfbd97f..0000000000 --- a/ci/git-problem-matcher.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "problemMatcher": [ - { - "owner": "git-test-suite", - "pattern": [ - { - "regexp": "^([^ :]+\\.sh):(\\d+): (error|warning|info):\\s+(.*)$", - "file": 1, - "line": 2, - "severity": 3, - "message": 4 - } - ] - } - ] -} @@ -157,11 +157,6 @@ then MAKEFLAGS="$MAKEFLAGS --jobs=10" test windows != "$CI_OS_NAME" || GIT_TEST_OPTS="--no-chain-lint --no-bin-wrappers $GIT_TEST_OPTS" - - # https://github.com/actions/toolkit/blob/master/docs/commands.md#problem-matchers - echo "::add-matcher::ci/git-problem-matcher.json" - test linux-musl = "$jobname" || - MAKEFLAGS="$MAKEFLAGS TEST_SHELL_PATH=/bin/sh" else echo "Could not identify CI type" >&2 env >&2 diff --git a/t/test-lib.sh b/t/test-lib.sh index baf94546da..d36b6ddc62 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -675,20 +675,6 @@ die () { fi } -file_lineno () { - test -z "$GIT_TEST_FRAMEWORK_SELFTEST" && test -n "$BASH" || return 0 - eval ' - 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 @@ -734,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; } |
