Skip to content

Commit 972ce85

Browse files
committed
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"
2 parents fde4622 + e31600b commit 972ce85

File tree

3 files changed

+1
-36
lines changed

3 files changed

+1
-36
lines changed

ci/git-problem-matcher.json

Lines changed: 0 additions & 16 deletions
This file was deleted.

ci/lib.sh

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -157,11 +157,6 @@ then
157157
MAKEFLAGS="$MAKEFLAGS --jobs=10"
158158
test windows != "$CI_OS_NAME" ||
159159
GIT_TEST_OPTS="--no-chain-lint --no-bin-wrappers $GIT_TEST_OPTS"
160-
161-
# https://github.com/actions/toolkit/blob/master/docs/commands.md#problem-matchers
162-
echo "::add-matcher::ci/git-problem-matcher.json"
163-
test linux-musl = "$jobname" ||
164-
MAKEFLAGS="$MAKEFLAGS TEST_SHELL_PATH=/bin/sh"
165160
else
166161
echo "Could not identify CI type" >&2
167162
env >&2

t/test-lib.sh

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -675,20 +675,6 @@ die () {
675675
fi
676676
}
677677

678-
file_lineno () {
679-
test -z "$GIT_TEST_FRAMEWORK_SELFTEST" && test -n "$BASH" || return 0
680-
eval '
681-
local i
682-
for i in ${!BASH_SOURCE[*]}
683-
do
684-
case $i,"${BASH_SOURCE[$i]##*/}" in
685-
0,t[0-9]*.sh) echo "t/${BASH_SOURCE[$i]}:$LINENO: ${1+$1: }"; return;;
686-
*,t[0-9]*.sh) echo "t/${BASH_SOURCE[$i]}:${BASH_LINENO[$(($i-1))]}: ${1+$1: }"; return;;
687-
esac
688-
done
689-
'
690-
}
691-
692678
GIT_EXIT_OK=
693679
trap 'die' EXIT
694680
# Disable '-x' tracing, because with some shells, notably dash, it
@@ -734,7 +720,7 @@ test_failure_ () {
734720
write_junit_xml_testcase "$1" " $junit_insert"
735721
fi
736722
test_failure=$(($test_failure + 1))
737-
say_color error "$(file_lineno error)not ok $test_count - $1"
723+
say_color error "not ok $test_count - $1"
738724
shift
739725
printf '%s\n' "$*" | sed -e 's/^/# /'
740726
test "$immediate" = "" || { finalize_junit_xml; GIT_EXIT_OK=t; exit 1; }

0 commit comments

Comments
 (0)