diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2006-06-09 13:11:02 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2006-06-09 13:11:02 +0000 |
commit | 86a39a1a34f2b8891cf80c108651b1d771182258 (patch) | |
tree | 27aa7080dc3f4a2d452551d804aab164d1d4bb96 /gpsfake | |
parent | 02dc93ea5a9aa8c305403d075d6cd2efe884a188 (diff) | |
download | gpsd-86a39a1a34f2b8891cf80c108651b1d771182258.tar.gz |
Add -v option to gpsfake.
Update regression test because of start-of-cycle check on GGA.
Diffstat (limited to 'gpsfake')
-rwxr-xr-x | gpsfake | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -39,7 +39,7 @@ class Baton: self.stream.write("...(%2.2f sec) %s.\n" % (time.time() - self.time, msg)) return -(options, arguments) = getopt.getopt(sys.argv[1:], "bc:D:ghilm:o:pr:s:") +(options, arguments) = getopt.getopt(sys.argv[1:], "bc:D:ghilm:o:pr:s:v") progress = False cycle = 0 monitor = "" @@ -49,6 +49,7 @@ pipe = False promptme = False init = "w+r+" doptions = "" +verbose = False for (switch, val) in options: if (switch == '-b'): progress = True @@ -73,6 +74,8 @@ for (switch, val) in options: init = val elif (switch == '-s'): speed = int(val) + elif (switch == '-v'): + verbose = True elif (switch == '-h'): sys.stderr.write("usage: gpsfake [-h] [-l] [-m monitor] [--D debug] [-o options] [-p] [-s speed] [-c cycle] [-b] logfile\n") raise SystemExit,0 @@ -103,7 +106,7 @@ def fakehook(linenumber, fakegps): if progress: baton = Baton("Processing %s" % logfile, "done") -test = gpsfake.TestSession(prefix=monitor, options=doptions) +test = gpsfake.TestSession(prefix=monitor, options=doptions, verbose=verbose) if pipe: test.reporter = sys.stdout.write |