From: Pierre Habouzit Date: Wed, 24 Oct 2007 20:03:39 +0000 (+0200) Subject: Support a --quiet option in the test-suite. X-Git-Tag: v1.5.4-rc0~322^2 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=1ece127467c1d65062f17777b1eedcd84fd9ea69;p=git.git Support a --quiet option in the test-suite. This shuts down the "* ok ##: `test description`" messages. Signed-off-by: Pierre Habouzit Signed-off-by: Junio C Hamano --- diff --git a/t/test-lib.sh b/t/test-lib.sh index 66efcdaac..714de6e57 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -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 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 } else say_color() { + test -z "$1" && test -n "$quiet" && return shift echo "* $*" }