summaryrefslogtreecommitdiff
path: root/regress-driver
diff options
context:
space:
mode:
authorFred Wright <fw@fwright.net>2017-03-04 16:14:25 -0800
committerFred Wright <fw@fwright.net>2017-03-04 16:30:58 -0800
commitb855a7f86834d5e77012ece0c90c75546dd47d1d (patch)
tree488d6eb2a6d16761d51dfd2c7b25971f887d3292 /regress-driver
parent01e26fc0136d09a0667f9961c4c09b6a940b7e37 (diff)
downloadgpsd-b855a7f86834d5e77012ece0c90c75546dd47d1d.tar.gz
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.
Diffstat (limited to 'regress-driver')
-rwxr-xr-xregress-driver14
1 files changed, 11 insertions, 3 deletions
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 <ots> - 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 <opt> - 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