index.html
sst.pyc
sst.html
+sst-doc.html
sst.6
doc/sst.doc
doc/sst-doc.txt
PYTHON=python
+TAPFILTER=cat
+ifeq (,$(command -v tapview))
+ TAPFILTER=tapview
+else
+ ifeq (,$(command -v tappy))
+ TAPFILTER=tappy
+ endif
+endif
+
all:
@echo "With Python 2:"
- @$(MAKE) -e PYTHON=python2 regress
+ @$(MAKE) -e PYTHON=python2 regress | $(TAPFILTER)
@echo "With Python 3:"
- @$(MAKE) -e PYTHON=python3 regress
+ @$(MAKE) -e PYTHON=python3 regress | $(TAPFILTER)
@echo "No diff output is good news."
.SUFFIXES: .log .chk
fi \
done
regress:
+ echo "1..$$(ls *.log | wc -l)"
@for test in $(TESTLOADS); \
do \
if [ ! -f $${test}.tst ] ; \
then \
- (if echo -n "$${test}: " >&2; grep 'Test' $${test}.log >&2;\
- $(PYTHON) ../sst.py -r $${test}.log >/tmp/regress 2>&1; \
- then diff -u $${test}.chk /tmp/regress; \
- else echo "*** Nonzero return status on $${test}!"; exit 1; fi;) \
+ legend=$$(sed -n -e '/# Test/s//Test/p' <$${test}.log); \
+ ../sst.py -r "$${test}.log" | ./tapdiffer "$${legend}" "$${test}.chk"; \
fi \
done
@rm -f /tmp/regress
--- /dev/null
+#! /bin/sh
+#
+# tapdiffer - Render diff between input and checkfile as a TAP report
+#
+# Usage: tapdiffer LEGEND CHECKFILE
+#
+# Output is a TAP report, ok if the diff is empty and not ok otherwisw.
+# A nonempty diff is shipped as a TAP YAML block following "not ok"
+# unless QUIET=1 in the environment.
+#
+legend=$1
+checkfile=$2
+
+trap 'rm /tmp/tapdiff$$' EXIT HUP INT QUIT TERM
+
+if diff --text -u ${checkfile} - >/tmp/tapdiff$$
+then
+ echo "ok - ${legend}"
+ exit 0
+else
+ echo "not ok - ${checkfile}: ${legend}"
+ if [ ! "${QUIET}" = 1 ]
+ then
+ echo " --- |"
+ sed </tmp/tapdiff$$ -e 's/^/ /'
+ echo " ..."
+ fi
+ exit 1
+fi
+
+# end
-SUPER- STAR TREK
Would you like a regular, tournament, or saved game? # SST2K version 2.4
-# Test bringng game up, viewng galaxy, quitting
+# Test bringing game up, viewing galaxy, quitting
# recorded by esr@snark on Wed Apr 24 01:46:01 2019
#seed(1556084761)
r
# seed 1556084761
# options
# SST2K version 2.4
-# Test bringng game up, viewng galaxy, quitting
+# Test bringing game up, viewing galaxy, quitting
# recorded by esr@snark on Wed Apr 24 01:46:01 2019
#seed(1556084761)
r