Browse Source

Support a --quiet option in the test-suite.

This shuts down the "*  ok ##: `test description`" messages.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
maint
Pierre Habouzit 17 years ago committed by Junio C Hamano
parent
commit
1ece127467
  1. 5
      t/test-lib.sh

5
t/test-lib.sh

@ -80,6 +80,8 @@ do @@ -80,6 +80,8 @@ do
exit 0 ;;
-v|--v|--ve|--ver|--verb|--verbo|--verbos|--verbose)
verbose=t; shift ;;
-q|--q|--qu|--qui|--quie|--quiet)
quiet=t; shift ;;
--no-color)
color=; shift ;;
--no-python)
@ -97,7 +99,7 @@ if test -n "$color"; then @@ -97,7 +99,7 @@ if test -n "$color"; then
skip) tput bold; tput setaf 2;; # bold green
pass) tput setaf 2;; # green
info) tput setaf 3;; # brown
*);;
*) test -n "$quiet" && return;;
esac
shift
echo "* $*"
@ -105,6 +107,7 @@ if test -n "$color"; then @@ -105,6 +107,7 @@ if test -n "$color"; then
}
else
say_color() {
test -z "$1" && test -n "$quiet" && return
shift
echo "* $*"
}

Loading…
Cancel
Save