summaryrefslogtreecommitdiff
path: root/gpsfake
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2015-02-13 07:10:54 -0500
committerEric S. Raymond <esr@thyrsus.com>2015-02-13 07:10:54 -0500
commit5bd56caa4a6592dbda2d94f1ce5c1dbcc01b8add (patch)
tree7bf288df88d4f858cd6f314395041f7e64b86129 /gpsfake
parent286192d304a562f04954b288a71e8ca2abd2313f (diff)
downloadgpsd-5bd56caa4a6592dbda2d94f1ce5c1dbcc01b8add.tar.gz
Revert "Significantly speed up testing."
It creates a race condition.
Diffstat (limited to 'gpsfake')
-rwxr-xr-xgpsfake11
1 files changed, 7 insertions, 4 deletions
diff --git a/gpsfake b/gpsfake
index 30bad940..bb50a99f 100755
--- a/gpsfake
+++ b/gpsfake
@@ -205,10 +205,13 @@ if __name__ == '__main__':
try:
if pipe:
- session = test.client_by_id(test.client_add(client_init + "\n"))
- for report in session:
- if report[u'class'] == u'WATCH':
- break
+ 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)
test.run()
except socket.error, msg:
sys.stderr.write("gpsfake: socket error %s.\n" % msg)