[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gpsd-dev] [PATCH 1/2] Adds missing failure messages to rtcm-regress and
From: |
Fred Wright |
Subject: |
[gpsd-dev] [PATCH 1/2] Adds missing failure messages to rtcm-regress and aivdm-regress. |
Date: |
Thu, 25 Feb 2016 14:53:24 -0800 |
Both rtcm-regress failures, and the aivdm idempotency failures, were
missing the "Test FAILED!" messages when failing. This adds them.
This does not include a more complicated fix to arrange a nonzero exit
status in the failing cases. These tests deserve being rewritten to
make better use of Python, anyway.
TESTED:
Exploited the OpenBSD mktemp failure to test the failing cases, as
well as testing the normal success cases on OSX.
---
SConstruct | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/SConstruct b/SConstruct
index b477cbf..a3c21b0 100644
--- a/SConstruct
+++ b/SConstruct
@@ -1570,13 +1570,14 @@ else:
'echo "\tTesting $${f}..."; '
'TMPFILE=`mktemp -t gpsd-test-XXXXXXXXXXXXXX.chk`; '
'$SRCDIR/gpsdecode -u -j <$${f} >$${TMPFILE}; '
- 'diff -ub $${f}.chk $${TMPFILE}; '
+ 'diff -ub $${f}.chk $${TMPFILE} || echo "Test FAILED!"; '
'rm -f $${TMPFILE}; '
'done;',
'@echo "Testing idempotency of JSON dump/decode for RTCM2"',
'@TMPFILE=`mktemp -t gpsd-test-XXXXXXXXXXXXXX.chk`; '
'$SRCDIR/gpsdecode -u -e -j <test/synthetic-rtcm2.json >$${TMPFILE}; '
- 'grep -v "^#" test/synthetic-rtcm2.json | diff -ub - $${TMPFILE}; '
+ 'grep -v "^#" test/synthetic-rtcm2.json | diff -ub - $${TMPFILE} '
+ '|| echo "Test FAILED!"; '
'rm -f $${TMPFILE}; ',
])
@@ -1620,14 +1621,14 @@ else:
'@echo "Testing idempotency of unscaled JSON dump/decode for AIS"',
'@TMPFILE=`mktemp -t gpsd-test-XXXXXXXXXXXXXX.chk`; '
'$SRCDIR/gpsdecode -u -e -j <$SRCDIR/test/sample.aivdm.ju.chk
>$${TMPFILE}; '
- 'grep -v "^#" $SRCDIR/test/sample.aivdm.ju.chk | diff -ub -
$${TMPFILE}; '
+ 'grep -v "^#" $SRCDIR/test/sample.aivdm.ju.chk | diff -ub -
$${TMPFILE} || echo "Test FAILED!"; '
'rm -f $${TMPFILE}; ',
# Parse the unscaled json reference, dump it as scaled json,
# and finally compare it with the scaled json reference
'@echo "Testing idempotency of scaled JSON dump/decode for AIS"',
'@TMPFILE=`mktemp -t gpsd-test-XXXXXXXXXXXXXX.chk`; '
'$SRCDIR/gpsdecode -e -j <$SRCDIR/test/sample.aivdm.ju.chk
>$${TMPFILE}; '
- 'grep -v "^#" $SRCDIR/test/sample.aivdm.js.chk | diff -ub -
$${TMPFILE}; '
+ 'grep -v "^#" $SRCDIR/test/sample.aivdm.js.chk | diff -ub -
$${TMPFILE} || echo "Test FAILED!"; '
'rm -f $${TMPFILE}; ',
])
--
2.7.1
- [gpsd-dev] [PATCH 1/2] Adds missing failure messages to rtcm-regress and aivdm-regress.,
Fred Wright <=