| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
Since debugging typically involves stopping at breakpoints, the
timeout tends to get in the way. This adds an implied -W0 to the -g
and -G options to avoid that. If for some reason the timeout is
actually wanted, it can be reenabled by providing a -W option after
the -g or -G.
TESTED:
Verified that -G disables the timeout. Did not test -g, though the
code is the same for it.
|
|
|
|
|
|
|
|
|
|
| |
This adds the -G option, which is like the -g option but using
lldb rather than gdb. It's not quite equivalent, since lldb
doesn't have the "-tui" option, although some versions of lldb
have a gui mode that can be entered via command.
TESTED:
Verified that -G launches with lldb as expected.
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
A tilda, not a dash.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
| |
Also fixes long lines and indentation.
TESTED:
Observed corrected -h output.
|
|
|
|
|
|
|
|
|
| |
Don't print 'log cycle begins' lines for quiet runs.
TESTED:
'gpsfake -q test/daemon/garmin17n.log' does not print anything.
Signed-off-by: Fred Wright <fw@fwright.net>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Output a succinct list of all options available for gpsfake.
This includes fixing the incorrect double hyphen for the debug level.
Note that gpsfake can handle multiple log files.
TESTED:
The list is displayed on 'gpsfake -h'
Signed-off-by: Fred Wright <fw@fwright.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This suppresses all "success chatter" from the daemon regression tests
when building in --silent (or -s) mode. Failing cases still output
the usual messages (except for "Processing..."). Other regression
chatter is still present, but this puts a big dent in it.
This involves three changes:
1) It adds a -q option to gpsfake, to suppress the "Processing"
messages.
2) It adds a -Q option to regress-driver, which passes -q to gpsfake
and also suppresses its own output in the success case. Failure
output is unaffected.
3) It adds the -Q option to regress-driver invocations when the build
is running in silent mode.
TESTED:
Ran regress-driver in normal, -q, and -Q modes.
Ran "scons build-all check", with and without -s.
Also tested an error case with a garbled .chk file.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Given that the data returned bye fake.py may include binary data,
'bytes' is a more appropriate type. Unlike the client API, where it's
easy to provide both return types, it would be less convenient to do
that here, so 'bytes' is preferred as the one choice (and is
consistent with network sockets).
When sending such data to stdout (or stderr), the straightforward
method is to write to sys.stdXXX.buffer rather than sys.stdXXX. That
doesn't exist in Python 2, but a helper function is now provided to
get the appropriate 'bytes' stream for stdXXX.
Since no previous *release* of GPSD is compatible with Python 3,
changing this now doesn't break anything based on released code.
TESTED:
Ran "scons check" on OSX with all supported Python versions.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Although this isn't strictly a Python 3 requirement, using the
new-style class definition syntax improves consistency between Python
2 and Python 3. Old-style classes have been deprecated since Python
2.2, but many such definitions linger on. Python 3 eliminates
old-style classes, but instead of complaining about old-style
definitions, it simply unconditionally and silently makes all classes
new-style. The only incompatible differences are quite subtle and
rarely matter in practice, but things are more consistent across
versions if the new-style definitions are used.
Also, the preferred method for subclasses to invoke parent init
methods is via the super() construct, which is only available with
new-style classes. Using super() is especially useful with multiple
inheritance, which it handles automatically (provided that the init
methods have compatible signatures).
TESTED:
Using an SConstruct patched to run the build helpers with the target
Python, ran "scons build-all check ", as well as gpsprof and xgps,
with all six supported Python versions (except 2.6 for xgps).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This makes the "future import" statements consistently specify
absolute_import, print_function, and division, for maximum consistency
between Python 2 and Python 3. Although absolute_import is probably a
don't care for top-level programs, if unit tests were ever implemented
for the programs they would be imported as modules, making the module
import behavior relevant.
Note that previous Python 3 fixes are a prerequisite for this change.
Also makes the "polyglot comment" consistent across sources.
TESTED:
Using a version of SConstruct patched to use the target Python for
build helpers, ran "scons build-all check valgrind-audit
www/hardware.html" with all six supported Python versions. Also ran
gegps, gpscat, gpsprof, xgps, and xgpsspeed with both Python 2 and
Python 3.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This incorporates the following changes:
1) Adds definitions for polystr(), polybytes(), and make_std_wrapper()
to misc.py (the most logical place for code needed by multiple
modules), using dummy definitions in the Python 2 case. For more
info, see the Practical Python Porting guide.
2) Reworks the logfile->daemon data path in fake.py to use 'bytes'
consistently.
3) Uses polybytes() in fake.py to construct control-socket commands as
'bytes', as expected by the socket I/O.
4) Uses make_std_wrapper() in gpsfake, to ensure that binary data is
correctly written to stdout.
5) Adds 'division' to the future imports in gpsfake for consistency,
though it doesn't actually matter in practice.
Also updates the compatibility comments in all three files, and fixes
a minor typo in misc.py.
TESTED:
Ran "scons build-all check" with Python 2.7, and ran all daemon
regression tests with Python 2.6 and with Python 3.2-3.5 (with
appropriately built extensions; not yet a build option).
|
| |
|
|
|
|
|
|
| |
For the moment most shebang lines still say 'python2' rather than just 'python'.
This is because the client code in gps/ hasn't been touched yet; the internal
imports break under Python 3 and that needs to be fixed.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This makes it possible to view the "slow" as well as the normal
WRITE_PAD values with gpsfake -T, without having to look at the source
code. It adds a new GetDelay() function to fake.py, which returns the
proper delay value, taking into account both the possible environment
variable and the "slow" option. This is now used for all hree uses of
WRITE_PAD.
Because the environment override is now part of the function, the
WRITE_PAD constant is no longer modified by the environment value, but
instead reflects the platform default.
TESTED:
Ran the full set of regression tests, with both default and acceptably
shortened WRITE_PAD. Also verified that a zero value causes trouble
(OSX), and that adding -S to the zero value makes it work.
Signed-off-by: Jon Schlueter <jon.schlueter@gmail.com>
|
|
|
|
|
|
|
| |
TESTED:
Ran a quick gpsfake -v with >/dev/null, and observed output.
Signed-off-by: Jon Schlueter <jon.schlueter@gmail.com>
|
|
|
|
|
| |
Part of a the isync patch series from Michael Brown <mbrown@fensystems.co.uk>,
which failed to apply properly and had to be hand-atched a bit.
|
|
|
|
|
|
| |
We've learned that Ubuntu 15.10 will have python3 as default. The ugly
transition gas befun; our only recourse is to hape that all our deployment
targets have 'pyton2' do the right thing. Works on 14.10.
|
| |
|
|
|
|
| |
All regression tests pass.
|
|
|
|
| |
in python you don't need parens around values for if elseif statements
|
|
|
|
| |
whitespace around operators and before function delcarations
|
|
|
|
| |
use "is None" instead of ""== None"
|
|
|
|
| |
random was imported but never used
|
|
|
|
| |
It creates a race condition.
|
|
|
|
|
|
| |
A delay in gpsfake is replaced by a watch for acknowledgment.
All regression tests pass.
|
| |
|
|
|
|
| |
All regression tests pass.
|
|
|
|
| |
All regression tests pass.
|
|
|
|
| |
All regression tests pass.
|
|
|
|
|
|
| |
This makes the -f option of gpsfake obsolete, and it has been removed.
All regression tests pass.
|
|
|
|
|
|
| |
Also, zero in on shorter delays in the regression tests.
All regression tests pass.
|
| |
|
| |
|
|
|
|
|
| |
They are different! This code printed one, and the if statement in
gps/fake.py used the other.
|
| |
|