209
209
--root=* )
210
210
root=$( expr " z$1 " : ' z[^=]*=\(.*\)' )
211
211
shift ;;
212
+ --statusprefix=* )
213
+ statusprefix=$( expr " z$1 " : ' z[^=]*=\(.*\)' )
214
+ shift ;;
212
215
* )
213
216
echo " error: unknown test option '$1 '" >&2 ; exit 1 ;;
214
217
esac
@@ -316,25 +319,25 @@ trap 'die' EXIT
316
319
317
320
test_ok_ () {
318
321
test_success=$(( $test_success + 1 ))
319
- say_color " " " ok $test_count - $@ "
322
+ say_color " " " ${statusprefix} ok $test_count - $@ "
320
323
}
321
324
322
325
test_failure_ () {
323
326
test_failure=$(( $test_failure + 1 ))
324
- say_color error " not ok $test_count - $1 "
327
+ say_color error " ${statusprefix} not ok $test_count - $1 "
325
328
shift
326
329
echo " $@ " | sed -e ' s/^/# /'
327
330
test " $immediate " = " " || { GIT_EXIT_OK=t; exit 1; }
328
331
}
329
332
330
333
test_known_broken_ok_ () {
331
334
test_fixed=$(( $test_fixed + 1 ))
332
- say_color error " ok $test_count - $@ # TODO known breakage vanished"
335
+ say_color error " ${statusprefix} ok $test_count - $@ # TODO known breakage vanished"
333
336
}
334
337
335
338
test_known_broken_failure_ () {
336
339
test_broken=$(( $test_broken + 1 ))
337
- say_color warn " not ok $test_count - $@ # TODO known breakage"
340
+ say_color warn " ${statusprefix} not ok $test_count - $@ # TODO known breakage"
338
341
}
339
342
340
343
test_debug () {
@@ -458,8 +461,8 @@ test_skip () {
458
461
of_prereq=" of $test_prereq "
459
462
fi
460
463
461
- say_color skip >&3 " skipping test: $@ "
462
- say_color skip " ok $test_count # skip $1 (missing $missing_prereq ${of_prereq} )"
464
+ say_color skip >&3 " ${statusprefix} skipping test: $@ "
465
+ say_color skip " ${statusprefix} ok $test_count # skip $1 (missing $missing_prereq ${of_prereq} )"
463
466
: true
464
467
;;
465
468
* )
@@ -497,11 +500,11 @@ test_done () {
497
500
498
501
if test " $test_fixed " ! = 0
499
502
then
500
- say_color error " # $test_fixed known breakage(s) vanished; please update test(s)"
503
+ say_color error " ${statusprefix} # $test_fixed known breakage(s) vanished; please update test(s)"
501
504
fi
502
505
if test " $test_broken " ! = 0
503
506
then
504
- say_color warn " # still have $test_broken known breakage(s)"
507
+ say_color warn " ${statusprefix} # still have $test_broken known breakage(s)"
505
508
fi
506
509
if test " $test_broken " ! = 0 || test " $test_fixed " ! = 0
507
510
then
@@ -524,9 +527,9 @@ test_done () {
524
527
then
525
528
if test $test_remaining -gt 0
526
529
then
527
- say_color pass " # passed all $msg "
530
+ say_color pass " ${statusprefix} # passed all $msg "
528
531
fi
529
- say " 1..$test_count$skip_all "
532
+ say " ${statusprefix} 1..$test_count$skip_all "
530
533
fi
531
534
532
535
test -d " $remove_trash " &&
@@ -540,8 +543,8 @@ test_done () {
540
543
* )
541
544
if test $test_external_has_tap -eq 0
542
545
then
543
- say_color error " # failed $test_failure among $msg "
544
- say " 1..$test_count "
546
+ say_color error " ${statusprefix} # failed $test_failure among $msg "
547
+ say " ${statusprefix} 1..$test_count "
545
548
fi
546
549
547
550
exit 1 ;;
0 commit comments