diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2010-04-04 19:09:56 -0400 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2010-04-04 19:09:56 -0400 |
commit | 4d6e043d7312b78ca480849089f843c70b17e7ad (patch) | |
tree | b1566f111d559df7c2b974e81c40943cbc6d90a1 /regress-driver | |
parent | ea05a2ec67d9e4e25c988399edb2a4a03792da29 (diff) | |
download | gpsd-4d6e043d7312b78ca480849089f843c70b17e7ad.tar.gz |
Filter -0.000 to 0.000. Suppress baton prompts on non-ttys unless -t.
Diffstat (limited to 'regress-driver')
-rwxr-xr-x | regress-driver | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/regress-driver b/regress-driver index c07d260c..ad978006 100755 --- a/regress-driver +++ b/regress-driver @@ -25,14 +25,14 @@ done shift $(($OPTIND - 1)) # Enables us to turn debugging up high without screwing up the diff checks -# First expression filters out device notifications on old protocol. +# First expression ignore difference between positive and negative zero # Second and third filter out gpsd log messages. # Fourth filters out gps.py verbose loggging # Fifth filters out new-style WATCH responses # Sixth filters out new-style DEVICE responses # Seventh filters out new-style VERSION responses # Eighth filters out device fields in new-style responses. -GPSFILTER="sed -e /^GPSD,X/d -e /^gpsd:/d -e /^gpsfake/d -e /GPS-DATA/d -e /WATCH/d -e /DEVICE/d -e /VERSION/d -e s/,\"device\":[^,}]*//" +GPSFILTER="sed -e /-0.000/s//0.000/ -e /^gpsd:/d -e /^gpsfake/d -e /GPS-DATA/d -e /WATCH/d -e /DEVICE/d -e /VERSION/d -e s/,\"device\":[^,}]*//" # Use ALTFILTER to set up custom filtering when a regression test fails # This example filters out altitude and some fields computed by gpsd's error @@ -42,6 +42,12 @@ GPSFILTER="sed -e /^GPSD,X/d -e /^gpsd:/d -e /^gpsfake/d -e /GPS-DATA/d -e /WATC TMP=/tmp +# Only twirl the baton on a tty, avoids junk in transcripts. +if [ -t 1 ] +then + PROGRESS=-b +fi + case $mode in regress) echo "Testing the $testing..." >&2 @@ -81,7 +87,7 @@ case $mode in superraw) echo "Testing super-raw mode..." >&2 for f in $*; do - gpsfake -s 38400 -1 -b -p -r '{"class":"WATCH","enable":False,"raw":2}' $opts ${f} \ + gpsfake -s 38400 -1 -p $opts -r '{"class":"WATCH","enable":False,"raw":2}' $opts ${f} \ | ./devtools/striplog -1 >${TMP}/test1-$$.chk; ./devtools/striplog <${f} >${TMP}/test2-$$.chk; cmp ${TMP}/test[12]-$$.chk; @@ -91,7 +97,7 @@ case $mode in echo "Rebuilding $testing regressions..." >&2 for f in $*; do case $testing in - daemon) gpsfake -s 38400 -1 -b -p $opts ${f} | ${GPSFILTER} >${f}.chk;; + daemon) gpsfake -s 38400 -1 -p $opts ${f} | ${GPSFILTER} >${f}.chk;; clientlib) libgps -b <${f} >${f}.chk ;; esac done @@ -101,7 +107,7 @@ case $mode in echo "Viewing..." >&2 for f in $*; do case $testing in - daemon) gpsfake -s 38400 -1 -b -p $opts ${f} | ${GPSFILTER} ;; + daemon) gpsfake -s 38400 -1 -p $opts ${f} | ${GPSFILTER} ;; clientlib) libgps -b <${f} ;; esac done |