Skip to content

Commit 633fe50

Browse files
trastgitster
authored andcommitted
Revert "test-lib: allow prefixing a custom string before "ok N" etc."
Now that ad0e623 (test-lib: support running tests under valgrind in parallel, 2013-06-23) has been reverted, this support code has no users any more. Revert it, too. This reverts commit e939e15. Signed-off-by: Junio C Hamano <[email protected]>
1 parent 26a0730 commit 633fe50

File tree

1 file changed

+12
-15
lines changed

1 file changed

+12
-15
lines changed

t/test-lib.sh

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -210,9 +210,6 @@ do
210210
--root=*)
211211
root=$(expr "z$1" : 'z[^=]*=\(.*\)')
212212
shift ;;
213-
--statusprefix=*)
214-
statusprefix=$(expr "z$1" : 'z[^=]*=\(.*\)')
215-
shift ;;
216213
*)
217214
echo "error: unknown test option '$1'" >&2; exit 1 ;;
218215
esac
@@ -320,25 +317,25 @@ trap 'die' EXIT
320317

321318
test_ok_ () {
322319
test_success=$(($test_success + 1))
323-
say_color "" "${statusprefix}ok $test_count - $@"
320+
say_color "" "ok $test_count - $@"
324321
}
325322

326323
test_failure_ () {
327324
test_failure=$(($test_failure + 1))
328-
say_color error "${statusprefix}not ok $test_count - $1"
325+
say_color error "not ok $test_count - $1"
329326
shift
330327
echo "$@" | sed -e 's/^/# /'
331328
test "$immediate" = "" || { GIT_EXIT_OK=t; exit 1; }
332329
}
333330

334331
test_known_broken_ok_ () {
335332
test_fixed=$(($test_fixed+1))
336-
say_color error "${statusprefix}ok $test_count - $@ # TODO known breakage vanished"
333+
say_color error "ok $test_count - $@ # TODO known breakage vanished"
337334
}
338335

339336
test_known_broken_failure_ () {
340337
test_broken=$(($test_broken+1))
341-
say_color warn "${statusprefix}not ok $test_count - $@ # TODO known breakage"
338+
say_color warn "not ok $test_count - $@ # TODO known breakage"
342339
}
343340

344341
test_debug () {
@@ -462,8 +459,8 @@ test_skip () {
462459
of_prereq=" of $test_prereq"
463460
fi
464461

465-
say_color skip >&3 "${statusprefix}skipping test: $@"
466-
say_color skip "${statusprefix}ok $test_count # skip $1 (missing $missing_prereq${of_prereq})"
462+
say_color skip >&3 "skipping test: $@"
463+
say_color skip "ok $test_count # skip $1 (missing $missing_prereq${of_prereq})"
467464
: true
468465
;;
469466
*)
@@ -501,11 +498,11 @@ test_done () {
501498

502499
if test "$test_fixed" != 0
503500
then
504-
say_color error "${statusprefix}# $test_fixed known breakage(s) vanished; please update test(s)"
501+
say_color error "# $test_fixed known breakage(s) vanished; please update test(s)"
505502
fi
506503
if test "$test_broken" != 0
507504
then
508-
say_color warn "${statusprefix}# still have $test_broken known breakage(s)"
505+
say_color warn "# still have $test_broken known breakage(s)"
509506
fi
510507
if test "$test_broken" != 0 || test "$test_fixed" != 0
511508
then
@@ -528,9 +525,9 @@ test_done () {
528525
then
529526
if test $test_remaining -gt 0
530527
then
531-
say_color pass "${statusprefix}# passed all $msg"
528+
say_color pass "# passed all $msg"
532529
fi
533-
say "${statusprefix}1..$test_count$skip_all"
530+
say "1..$test_count$skip_all"
534531
fi
535532

536533
test -d "$remove_trash" &&
@@ -544,8 +541,8 @@ test_done () {
544541
*)
545542
if test $test_external_has_tap -eq 0
546543
then
547-
say_color error "${statusprefix}# failed $test_failure among $msg"
548-
say "${statusprefix}1..$test_count"
544+
say_color error "# failed $test_failure among $msg"
545+
say "1..$test_count"
549546
fi
550547

551548
exit 1 ;;

0 commit comments

Comments
 (0)