git @ Cat's Eye Technologies Kosheri / f3cdd34
Make driver fail when tests fail. Update tests to latest Falderal. Chris Pressey 9 years ago
3 changed file(s) with 29 addition(s) and 40 deletion(s). Raw diff Collapse all Expand all
00 #!/bin/sh
1
2 error() {
3 if [ $0 != 0 ]; then
4 cat ERRORS
5 rm -f ERRORS
6 exit 1
7 fi
8 }
19
210 cd src
311
4 make clean all >ERRORS 2>&1
5 if [ $? != 0 ]; then
6 cat ERRORS
7 rm -f ERRORS
8 exit 1
9 fi
12 make clean all >ERRORS 2>&1 || error $?
13
1014 echo "Testing default build..."
11 falderal -b test ../tests/Assembly.markdown ../tests/Term.markdown
15 TESTS="../tests/Assembly.markdown ../tests/Term.markdown"
16 falderal -b test $TESTS >ERRORS 2>&1 || error $?
1217
13 make clean all CFLAGS=-DDIRECT_THREADING >ERRORS 2>&1
14 if [ $? != 0 ]; then
15 cat ERRORS
16 rm -f ERRORS
17 exit 1
18 fi
18 make clean all CFLAGS=-DDIRECT_THREADING >ERRORS 2>&1 || error $?
19
1920 echo "Testing direct threading build..."
20 falderal -b test ../tests/Assembly.markdown ../tests/Term.markdown
21 falderal -b test $TESTS >ERRORS 2>&1 || error $?
2122
22 make clean tool >ERRORS 2>&1
23 if [ $? != 0 ]; then
24 cat ERRORS
25 rm -f ERRORS
26 exit 1
27 fi
23 make clean tool >ERRORS 2>&1 || error $?
24
2825 echo "Testing 'tool' build..."
29 falderal -b test ../tests/Assembly.markdown ../tests/Term.markdown
26 falderal -b test $TESTS >ERRORS 2>&1 || error $?
3027
31 make clean static >ERRORS 2>&1
32 if [ $? != 0 ]; then
33 cat ERRORS
34 rm -f ERRORS
35 exit 1
36 fi
28 make clean static >ERRORS 2>&1 || error $?
29
3730 echo "Testing 'static' build..."
38 falderal -b test ../tests/Assembly.markdown ../tests/Term.markdown
31 falderal -b test $TESTS >ERRORS 2>&1 || error $?
3932
4033 echo "Building 'debug' version..."
41 make clean debug >ERRORS 2>&1
42 if [ $? != 0 ]; then
43 cat ERRORS
44 rm -f ERRORS
45 exit 1
46 fi
34 make clean debug >ERRORS 2>&1 || error $?
35
4736 make clean
4837 rm -f ERRORS
11 ================
22
33 -> Functionality "Round-trip Kosheri Assembly" is implemented by shell command
4 -> "./assemble --asmfile %(test-file) --vmfile foo.kvm && ./disasm --vmfile foo.kvm --asmfile %(output-file)"
5
4 -> "./assemble --asmfile %(test-body-file) --vmfile foo.kvm && ./disasm --vmfile foo.kvm --asmfile %(output-file)"
5
66 -> Tests for functionality "Round-trip Kosheri Assembly"
77
88 | NEW_AR #10
116116 =
117117
118118 -> Functionality "Run Kosheri Assembly" is implemented by shell command
119 -> "./assemble --asmfile %(test-file) --vmfile foo.kvm >/dev/null 2>&1 && ./run --vmfile foo.kvm"
120
119 -> "./assemble --asmfile %(test-body-file) --vmfile foo.kvm >/dev/null 2>&1 && ./run --vmfile foo.kvm"
120
121121 -> Tests for functionality "Run Kosheri Assembly"
122122
123123 Hello, world-ing
11 =============
22
33 -> Functionality "Freeze and Thaw Kosheri Term" is implemented by shell command
4 -> "./freeze --termfile %(test-file) --binfile foo.bin && ./thaw --binfile foo.bin --termfile %(output-file)"
5
4 -> "./freeze --termfile %(test-body-file) --binfile foo.bin && ./thaw --binfile foo.bin --termfile %(output-file)"
5
66 -> Tests for functionality "Freeze and Thaw Kosheri Term"
77
88 Freeze and thaw a well-formed, complex term.