Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Support a --quiet option in the test-suite.
author
Pierre Habouzit
<madcoder@debian.org>
Wed, 24 Oct 2007 20:03:39 +0000
(22:03 +0200)
committer
Junio C Hamano
<gitster@pobox.com>
Thu, 25 Oct 2007 05:44:14 +0000
(22:44 -0700)
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>
t/test-lib.sh
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
55db1df
)
diff --git
a/t/test-lib.sh
b/t/test-lib.sh
index 66efcdaacd72c0242a567830ea9a4cf95fc0860d..714de6e5753e200d8685ef244a428d099a3ae95d 100644
(file)
--- 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 ;;
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)
--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
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 "* $*"
esac
shift
echo "* $*"
@@
-105,6
+107,7
@@
if test -n "$color"; then
}
else
say_color() {
}
else
say_color() {
+ test -z "$1" && test -n "$quiet" && return
shift
echo "* $*"
}
shift
echo "* $*"
}