From b855a7f86834d5e77012ece0c90c75546dd47d1d Mon Sep 17 00:00:00 2001 From: Fred Wright Date: Sat, 4 Mar 2017 16:14:25 -0800 Subject: Makes "silent" build quieter. This suppresses all "success chatter" from the daemon regression tests when building in --silent (or -s) mode. Failing cases still output the usual messages (except for "Processing..."). Other regression chatter is still present, but this puts a big dent in it. This involves three changes: 1) It adds a -q option to gpsfake, to suppress the "Processing" messages. 2) It adds a -Q option to regress-driver, which passes -q to gpsfake and also suppresses its own output in the success case. Failure output is unaffected. 3) It adds the -Q option to regress-driver invocations when the build is running in silent mode. TESTED: Ran regress-driver in normal, -q, and -Q modes. Ran "scons build-all check", with and without -s. Also tested an error case with a garbled .chk file. --- regress-driver | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'regress-driver') diff --git a/regress-driver b/regress-driver index 8092d84a..fe42970a 100755 --- a/regress-driver +++ b/regress-driver @@ -49,7 +49,8 @@ logfile="" help="0" baton=false quiet=false -while getopts cl:sStbuvo:qh opt +quieter=false +while getopts cl:sStbuvo:qQh opt do case $opt in c) testing=clientlib ;; # 'client' rather than the daemon @@ -62,6 +63,7 @@ do v) mode=view ;; # View result of generating a check file o) opts="$opts $OPTARG" ;; # Pass options to gpsfake q) quiet=true ;; # Suppress header/trailer messages + Q) quiet=true; quieter=true ;; # Suppress all success chatter h) help="1" ;; esac done @@ -79,10 +81,11 @@ then echo "-S - run regression tests with realistic timing delays" echo "-t - Run regression tests w/baton" echo "-b - Rebuild regression check files" - echo "-u - Force UDP" + echo "-u - Force UDP" echo "-v - view result of generating a check file" echo "-o - Pass options to gpsfake" echo "-q - Suppress header/trailer messages" + echo "-Q - Suppress all success chatter" echo exit 0 @@ -120,6 +123,11 @@ then opts="$opts -S" fi +if [ $quieter = true ] +then + opts="$opts -q" +fi + case $mode in regress|slowregress) [ $quiet = true ] || echo "Testing the $testing..." >&2 @@ -174,7 +182,7 @@ case $mode in else if [ $quiet = true ] && [ $total -eq 1 ] && [ $notfound -eq 0 ] then - echo "Regression test $1 successful" + [ $quieter = true ] || echo "Regression test $1 successful" else echo "Regression test successful: no errors in $total tests ($notfound not found)."; fi -- cgit v1.2.1