Incorporate tapview
[super-star-trek.git] / test / Makefile
1 # Test-suite makefile for sst
2
3 PYTHON=python3
4
5 all:
6         @echo "With Python 2:"
7         @$(MAKE) -e PYTHON=python2 regress | ./tapview
8         @echo "With Python 3:"
9         @$(MAKE) -e PYTHON=python3 regress | ./tapview
10         @echo "No diff output is good news."
11
12 .SUFFIXES: .log .chk
13
14 .log.chk:
15         ../sst.py -r $< >$@ 2>&1
16
17 TESTLOADS := $(shell ls *.log | sed '/.log/s///')
18 buildregress:
19         @for test in $(TESTLOADS); do \
20             if [ ! -f $${test}.tst ] ; \
21             then \
22                     echo "Remaking $${test}.chk"; \
23                     rm -f $${test}.chk && ../sst.py -r $${test}.log >$${test}.chk 2>&1; \
24             fi \
25         done
26 regress:
27         echo "1..$$(ls *.log | wc -l)"
28         @for test in $(TESTLOADS); \
29         do \
30             if [ ! -f $${test}.tst ] ; \
31             then \
32                 legend=$$(sed -n -e '/# Test/s//Test/p' <$${test}.log); \
33                 ../sst.py -r "$${test}.log" | ./tapdiffer "$${legend}" "$${test}.chk"; \
34             fi \
35         done
36         @rm -f /tmp/regress