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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Signed-off-by: Pierre Habouzit <madcoder@xxxxxxxxxx>
---
 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@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux