Skip to content

Commit 1ece127

Browse files
MadCodergitster
authored andcommitted
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>
1 parent 55db1df commit 1ece127

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

t/test-lib.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ do
8080
exit 0 ;;
8181
-v|--v|--ve|--ver|--verb|--verbo|--verbos|--verbose)
8282
verbose=t; shift ;;
83+
-q|--q|--qu|--qui|--quie|--quiet)
84+
quiet=t; shift ;;
8385
--no-color)
8486
color=; shift ;;
8587
--no-python)
@@ -97,14 +99,15 @@ if test -n "$color"; then
9799
skip) tput bold; tput setaf 2;; # bold green
98100
pass) tput setaf 2;; # green
99101
info) tput setaf 3;; # brown
100-
*);;
102+
*) test -n "$quiet" && return;;
101103
esac
102104
shift
103105
echo "* $*"
104106
tput sgr0
105107
}
106108
else
107109
say_color() {
110+
test -z "$1" && test -n "$quiet" && return
108111
shift
109112
echo "* $*"
110113
}

0 commit comments

Comments
 (0)