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 e939e15d241e942662b9f88f6127ab470ab0a0b9. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Thomas Rast committed
Oct 19, 2013 at 23:06 UTC
633fe50ab7d718dc92b3f3e988296a9aa501af78
1 file changed
+12
-15
t/test-lib.sh
+12
-15
@@ -210,9 +210,6 @@ do
210
--root=*)
211
root=$(expr "z$1" : 'z[^=]*=\(.*\)')
212
shift ;;
213
- --statusprefix=*)
214
- statusprefix=$(expr "z$1" : 'z[^=]*=\(.*\)')
215
- shift ;;
213
*)
214
echo "error: unknown test option '$1'" >&2; exit 1 ;;
215
esac
@@ -320,12 +317,12 @@ trap 'die' EXIT
317
318
test_ok_ () {
319
test_success=$(($test_success + 1))
323
- say_color "" "${statusprefix}ok $test_count - $@"
320
+ say_color "" "ok $test_count - $@"
321
}
322
323
test_failure_ () {
324
test_failure=$(($test_failure + 1))
328
- say_color error "${statusprefix}not ok $test_count - $1"
325
+ say_color error "not ok $test_count - $1"
326
shift
327
echo "$@" | sed -e 's/^/# /'
328
test "$immediate" = "" || { GIT_EXIT_OK=t; exit 1; }
@@ -333,12 +330,12 @@ test_failure_ () {
330
331
test_known_broken_ok_ () {
332
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"
334
}
335
336
test_known_broken_failure_ () {
337
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"
339
}
340
341
test_debug () {
@@ -462,8 +459,8 @@ test_skip () {
459
of_prereq=" of $test_prereq"
460
fi
461
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})"
464
: true
465
;;
466
*)
@@ -501,11 +498,11 @@ test_done () {
498
499
if test "$test_fixed" != 0
500
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)"
502
fi
503
if test "$test_broken" != 0
504
then
508
- say_color warn "${statusprefix}# still have $test_broken known breakage(s)"
505
+ say_color warn "# still have $test_broken known breakage(s)"
506
fi
507
if test "$test_broken" != 0 || test "$test_fixed" != 0
508
then
@@ -528,9 +525,9 @@ test_done () {
525
then
526
if test $test_remaining -gt 0
527
then
531
- say_color pass "${statusprefix}# passed all $msg"
528
+ say_color pass "# passed all $msg"
529
fi
533
- say "${statusprefix}1..$test_count$skip_all"
530
+ say "1..$test_count$skip_all"
531
fi
532
533
test -d "$remove_trash" &&
@@ -544,8 +541,8 @@ test_done () {
541
*)
542
if test $test_external_has_tap -eq 0
543
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"
546
fi
547
548
exit 1 ;;