diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2015-02-13 06:16:24 -0500 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2015-02-13 06:16:24 -0500 |
commit | 286192d304a562f04954b288a71e8ca2abd2313f (patch) | |
tree | 3ec9083d0bfafdf7ee9a6d0a2745e335eb7e1e1b /gpsfake | |
parent | 9e66806a5f3f922520ed6892ede3906d79103076 (diff) | |
download | gpsd-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-x | gpsfake | 11 |
1 files changed, 4 insertions, 7 deletions
@@ -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) |