| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
Although the client read() method provides a return value to indicate
that daemon output has become unavailable (due to its death), the
run() method in fake.py was ignoring it, and just repeatedly outputting
the old string until it eventually noticed the death. It now pays
attention to the failure return.
TESTED:
All tests pass. Quitting the daemon while stopped at a breakpoint no
longer spews duplicated output for a while.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Death of the daemon (after initial connection) wasn't being noticed,
so that the daemon dying (e.g., by quitting it from a debugger) left
gpsfake looping and spewing output. This puts an alive check in the
main loop, as well as in an inner loop that's sometimes relevant.
TESTED:
Quit the daemon after stopping at breakpoints in a couple of different
cases; gpsfake now quits with an error. It does still spew a bunch of
duplicated output in some cases, though.
|
|
|
|
|
|
|
|
|
|
| |
Although there doesn't seem to be any WRITE_PAD value that's 100%
reliable, 5ms is usually adequately generous for OSX, and is the override
value currently used by MacPorts. The current default 30ms makes
some tests way too slow.
TESTED:
Tests pass on OSX 10.5-10.13.
|
|
|
|
|
|
|
|
|
|
|
| |
This adds an argument to allow overriding the default 60-second
timeout on gpsd's activity. A value of 0 disables the timeout
completely. Note that the timeout mechanism is somewhat sloppy, and
typically adds about 20s to the value.
TESTED:
Ran with unspecified (default) timeout, a short timeout, a long
timeout, and no timeout, all with reasonable results.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Add notes as reminder for next change.
|
|
|
|
| |
A tilda, not a dash.
|
| |
|
| |
|
|
|
|
| |
Found a bug. Variable steam s/b stream.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
So client can check for matching python module version
|
| |
|
| |
|
|
|
|
| |
We have to support Python 2 for a bit longer.
|
|
|
|
| |
So gps/client crashes on a failed connection.
|
| |
|
|
|
|
| |
Note the program pep8 is now called pycodestyle
|
|
|
|
| |
Thanks to Virgin Orbit for their support on this patch.
|
|
|
|
| |
The reconnect patch lost host and port.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Whoops, the auto reconnect patch broke scons check.
Signed-off-by: Gary E. Miller <gem@rellim.com>
|
|
|
|
| |
Signed-off-by: Gary E. Miller <gem@rellim.com>
|
|
|
|
|
|
|
|
|
|
| |
- moved WATCH_* options to their own file to deduplicate definition
- defaults behavior is to exit-on-failure
- activated by calling to `gps.gps(..., reconnect=True)`
- refactors stream(...) function to deduplicate processing
- added dictionary methods to 'class dictwrapper'
Signed-off-by: Gary E. Miller <gem@rellim.com>
|
| |
|
|
|
|
|
| |
pylint complains when a class function is overridden with a function
taking different arguments.
|
| |
|
| |
|
|
|
|
|
|
| |
Not sure how to decode class DEVICES yet...
pylint does not like FIXME, and not broken, just a TODO (enhancement).
|
|
|
|
|
|
|
|
|
|
|
| |
This doesn't fix all complaints by pylint, but significantly
reduces their number. Ditto for pep8 complaints.
Also makes a couple of related cosmetic edits.
TESTED:
Ran "scons build-all check" with no errors.
Both "pylint" and "pep8" targets report fewer issues.
|
|
|
|
|
|
|
|
|
|
|
|
| |
The default port number used by gpsfake is (probably incorrectly)
specified as a string rather than an integer. The shmkey derivation
added in commit 1f209455 expects an integer, causing a failure when
the port is not explicitly specified. This fix forces an integer
where needed.
TESTED:
Ran "scons build-all check".
Previously failing gpsfake case now works correctly.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Prior to this change, multiple gpsd instances would normally share a
single SHM segment, confusing anyone using it. This was a problem
either when running parallel regression tests, or even when running a
single test with a system gpsd also running. Now, each gpsd instance
launched by fake.py gets a SHM ID of the form 0x4770xxxx, where xxxx
is the TCP or UDP port number. The high-order part is 0x4770 ('Gp')
instead of 0x4750 ('GP') to ensure that it doesn't collide with the
standard 'GPSD'.
This does not do anything about 'NTPx' SHM segments.
TESTED:
Ran "scons -j24 check", and observed many 'Gpxx' SHM segments with
ipcs, all disappearing by the end of testing.
|
|
|
|
|
|
|
|
|
|
|
| |
This generates a more specific exception when a connect from
client_add() fails due to the daemon's having died. Aside from real
daemon failures, this also catches some broken valgrind cases.
TESTED:
Ran "scons build-all check" on OSX. Also ran failing valgrind-audit
and observed more informative (and less verbose) backtrace. Note that
this is due to an OSX issue with valgrind itself, not the daemon.
|
|
|
|
|
|
|
|
|
| |
This reduces duplicated code by using subclasses for local exceptions.
It's not entirely clear that limiting __str__() to only certain
exceptions is necessary, but it preserves that behavior.
TESTED:
Ran "scons build-all check" on several platforms.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This does two things:
1) It splits DaemonInstance into a base class and subclass, where the
base class is a more generic subprogram runner. This makes it easier
to add additional program runners without code duplication.
2) It switches from os.system() to subprocess.Popen() as the mechanism
for running subprograms. This is generally cleaner, and in
"background mode" is able to use natural parallelism rather than the
ugly kludge of using shell backgrounding. Aside from being less ugly,
this also makes termination of the "background" process directly
visible, avoiding, e.g., hangs when valgrind bombs.
TESTED:
Ran "scons build-all check" on several platforms. Also ran
valgrind-audit where valgrind was installed, though this has issues on
some platforms.
|
|
|
|
|
|
|
|
|
|
| |
This value is only provided as a convenience, and has no internal
function at all. It was never updated to reflect the two increases in
gps.h. The new value would be excessive for xgps, but that no longer
uses this definition.
TESTED:
No point.
|