[PATCH] Support a --quiet option in the test-suite.

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <gitster@...>
Cc: <git@...>, Pierre Habouzit <madcoder@...>
Date: Wednesday, October 24, 2007 - 4:03 pm

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

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
---
 t/test-lib.sh |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/t/test-lib.sh b/t/test-lib.sh
index 49c779b..7cd27bd 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -79,6 +79,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)
@@ -101,7 +103,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 "* $*"
@@ -109,6 +111,7 @@ if test -n "$color"; then
 	}
 else
 	say_color() {
+		test -z "$1" && test -n "$quiet" && return
 		shift
 		echo "* $*"
 	}
-- 
1.5.3.4.1343.gf9b40

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Small enhancements of the test-lib.sh, Pierre Habouzit, (Wed Oct 24, 4:03 pm)
[PATCH] Support a --quiet option in the test-suite., Pierre Habouzit, (Wed Oct 24, 4:03 pm)