summaryrefslogtreecommitdiff
path: root/gpsfake
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2015-02-13 06:16:24 -0500
committerEric S. Raymond <esr@thyrsus.com>2015-02-13 06:16:24 -0500
commit286192d304a562f04954b288a71e8ca2abd2313f (patch)
tree3ec9083d0bfafdf7ee9a6d0a2745e335eb7e1e1b /gpsfake
parent9e66806a5f3f922520ed6892ede3906d79103076 (diff)
downloadgpsd-286192d304a562f04954b288a71e8ca2abd2313f.tar.gz
Significantly speed up testing.
A delay in gpsfake is replaced by a watch for acknowledgment. All regression tests pass.
Diffstat (limited to 'gpsfake')
-rwxr-xr-xgpsfake11
1 files changed, 4 insertions, 7 deletions
diff --git a/gpsfake b/gpsfake
index bb50a99f..30bad940 100755
--- a/gpsfake
+++ b/gpsfake
@@ -205,13 +205,10 @@ if __name__ == '__main__':
try:
if pipe:
- test.client_add(client_init + "\n")
- # Give daemon time to get ready for the feeds.
- # Without a delay here there's a window for test
- # sentences to arrive before the watch takes effect.
- # This needs to increase if leading sentences in
- # test loads aren't being processed.
- time.sleep(1)
+ session = test.client_by_id(test.client_add(client_init + "\n"))
+ for report in session:
+ if report[u'class'] == u'WATCH':
+ break
test.run()
except socket.error, msg:
sys.stderr.write("gpsfake: socket error %s.\n" % msg)