diff options
author | Fred Wright <fw@fwright.net> | 2016-02-20 16:37:40 -0800 |
---|---|---|
committer | Jon Schlueter <jschlueter@redhat.com> | 2016-02-20 23:35:30 -0500 |
commit | 8cfa924ba3283ebbcbcc16fe09f3348764170c39 (patch) | |
tree | 71ff724f13bbcf6d83f32b3063bbc65868eb1c22 /regress-driver | |
parent | 06aac6020a56f027669ff9505c3b48cfbd13b7b7 (diff) | |
download | gpsd-8cfa924ba3283ebbcbcc16fe09f3348764170c39.tar.gz |
Fixes manual use of regress-driver with binary logs.
At present, running regress-driver manually on binary logs may fail,
even though it works when run from scons. This is due to running in
an unsanitized environment when run manually.
The problem is that sed is being used to filter the daemon output, and
it's not really kosher to be using sed on binary data. Whether the
"working" cases involve its working "correctly" or merely
"reproducibly" is unclear, but what is clear is that in can choke on
binary data with certain settings of the LANG environment variable (in
particular, "en_US.UTF-8" is known to fail on ac12_binary). The fix
is merely to unset LANG in regress-driver.
Failures on binary data are also not very informative due to diff
simply reporting "binary files differ". That can be fixed by adding
the -b option to diff, but the resulting output can contain characters
that screw up the terminal, so it's probably not a good default.
TESTED:
Ran the full "scons check" with this change, as well as a manual
"./regress-driver test/daemon/*.log", and observed success in both
cases.
Signed-off-by: Jon Schlueter <jschlueter@redhat.com>
Diffstat (limited to 'regress-driver')
-rwxr-xr-x | regress-driver | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/regress-driver b/regress-driver index ea758206..f3b886ea 100755 --- a/regress-driver +++ b/regress-driver @@ -14,6 +14,9 @@ else GPSD_HOME=`dirname $0` fi +# sed may choke on binary data with some LANG settings +unset LANG + # Arrange to call a gpsfake in the source directory without fuss. if [ -z ${PYTHON} ]; then PYTHON="python2" |