summaryrefslogtreecommitdiff
path: root/SConstruct
diff options
context:
space:
mode:
authorFred Wright <fw@fwright.net>2016-02-25 14:53:25 -0800
committerJon Schlueter <jschlueter@redhat.com>2016-02-25 19:51:23 -0500
commit9e8ec3a51760191fa1a776da89bffae807378092 (patch)
tree2cc7ca2255a39c569dce67d8954f688481c40c56 /SConstruct
parent37ce7c24044f60533d72921c4b715e7f0b0a0010 (diff)
downloadgpsd-9e8ec3a51760191fa1a776da89bffae807378092.tar.gz
Fixes rtcm-regress and aivdm-regress for OpenBSD.
Traditionally, mktemp required that the Xs in the template be at the end. Although most modern versions of mktemp have relaxed this restriction (in spite of what their manpages may say), the OpenBSD mktemp still has this restriction, and fails with the templates provided in these tests. Rearranging the templates fixes this, at the expense of no longer having a pure ".chk" extension on the temp files. TESTED: Verified that these previously failing tests now pass on OpenBSD 5.6 (as well as OSX). Signed-off-by: Jon Schlueter <jschlueter@redhat.com>
Diffstat (limited to 'SConstruct')
-rw-r--r--SConstruct14
1 files changed, 7 insertions, 7 deletions
diff --git a/SConstruct b/SConstruct
index a3c21b05..202401a0 100644
--- a/SConstruct
+++ b/SConstruct
@@ -1568,13 +1568,13 @@ else:
'@echo "Testing RTCM decoding..."',
'@for f in $SRCDIR/test/*.rtcm2; do '
'echo "\tTesting $${f}..."; '
- 'TMPFILE=`mktemp -t gpsd-test-XXXXXXXXXXXXXX.chk`; '
+ 'TMPFILE=`mktemp -t gpsd-test.chk-XXXXXXXXXXXXXX`; '
'$SRCDIR/gpsdecode -u -j <$${f} >$${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`; '
+ '@TMPFILE=`mktemp -t gpsd-test.chk-XXXXXXXXXXXXXX`; '
'$SRCDIR/gpsdecode -u -e -j <test/synthetic-rtcm2.json >$${TMPFILE}; '
'grep -v "^#" test/synthetic-rtcm2.json | diff -ub - $${TMPFILE} '
'|| echo "Test FAILED!"; '
@@ -1597,7 +1597,7 @@ else:
'@echo "Testing AIVDM decoding w/ CSV format..."',
'@for f in $SRCDIR/test/*.aivdm; do '
'echo "\tTesting $${f}..."; '
- 'TMPFILE=`mktemp -t gpsd-test-XXXXXXXXXXXXXX.chk`; '
+ 'TMPFILE=`mktemp -t gpsd-test.chk-XXXXXXXXXXXXXX`; '
'$SRCDIR/gpsdecode -u -c <$${f} >$${TMPFILE}; '
'diff -ub $${f}.chk $${TMPFILE} || echo "Test FAILED!"; '
'rm -f $${TMPFILE}; '
@@ -1605,7 +1605,7 @@ else:
'@echo "Testing AIVDM decoding w/ JSON unscaled format..."',
'@for f in $SRCDIR/test/*.aivdm; do '
'echo "\tTesting $${f}..."; '
- 'TMPFILE=`mktemp -t gpsd-test-XXXXXXXXXXXXXX.chk`; '
+ 'TMPFILE=`mktemp -t gpsd-test.chk-XXXXXXXXXXXXXX`; '
'$SRCDIR/gpsdecode -u -j <$${f} >$${TMPFILE}; '
'diff -ub $${f}.ju.chk $${TMPFILE} || echo "Test FAILED!"; '
'rm -f $${TMPFILE}; '
@@ -1613,20 +1613,20 @@ else:
'@echo "Testing AIVDM decoding w/ JSON scaled format..."',
'@for f in $SRCDIR/test/*.aivdm; do '
'echo "\tTesting $${f}..."; '
- 'TMPFILE=`mktemp -t gpsd-test-XXXXXXXXXXXXXX.chk`; '
+ 'TMPFILE=`mktemp -t gpsd-test.chk-XXXXXXXXXXXXXX`; '
'$SRCDIR/gpsdecode -j <$${f} >$${TMPFILE}; '
'diff -ub $${f}.js.chk $${TMPFILE} || echo "Test FAILED!"; '
'rm -f $${TMPFILE}; '
'done;',
'@echo "Testing idempotency of unscaled JSON dump/decode for AIS"',
- '@TMPFILE=`mktemp -t gpsd-test-XXXXXXXXXXXXXX.chk`; '
+ '@TMPFILE=`mktemp -t gpsd-test.chk-XXXXXXXXXXXXXX`; '
'$SRCDIR/gpsdecode -u -e -j <$SRCDIR/test/sample.aivdm.ju.chk >$${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`; '
+ '@TMPFILE=`mktemp -t gpsd-test.chk-XXXXXXXXXXXXXX`; '
'$SRCDIR/gpsdecode -e -j <$SRCDIR/test/sample.aivdm.ju.chk >$${TMPFILE}; '
'grep -v "^#" $SRCDIR/test/sample.aivdm.js.chk | diff -ub - $${TMPFILE} || echo "Test FAILED!"; '
'rm -f $${TMPFILE}; ',