summaryrefslogtreecommitdiff
path: root/gpsfake
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 /gpsfake
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 'gpsfake')
-rwxr-xr-xgpsfake7
1 files changed, 5 insertions, 2 deletions
diff --git a/gpsfake b/gpsfake
index 82e4809a..f9450359 100755
--- a/gpsfake
+++ b/gpsfake
@@ -106,7 +106,7 @@ def fakehook(linenumber, fakegps):
if __name__ == '__main__':
try:
- (options, arguments) = getopt.getopt(sys.argv[1:], "1bc:D:ghilm:no:pP:r:s:StTuvx")
+ (options, arguments) = getopt.getopt(sys.argv[1:], "1bc:D:ghilm:no:pP:qr:s:StTuvx")
except getopt.GetoptError as msg:
print("gpsfake: " + str(msg))
raise SystemExit(1)
@@ -127,6 +127,7 @@ if __name__ == '__main__':
udp = False
verbose = 0
slow = False
+ quiet = False
for (switch, val) in options:
if switch == '-1':
singleshot = True
@@ -154,6 +155,8 @@ if __name__ == '__main__':
pipe = True
elif switch == '-P':
port = int(val)
+ elif switch == '-q':
+ quiet = True
elif switch == '-r':
client_init = val
elif switch == '-s':
@@ -185,7 +188,7 @@ if __name__ == '__main__':
if progress:
baton = Baton("Processing %s" % ",".join(arguments), "done")
- else:
+ elif not quiet:
sys.stderr.write("Processing %s\n" % ",".join(arguments))
# Don't allocate a private port when cycling logs for client testing.