Make driver fail when tests fail. Update tests to latest Falderal.
Chris Pressey
9 years ago
0 | 0 |
#!/bin/sh
|
|
1 |
|
|
2 |
error() {
|
|
3 |
if [ $0 != 0 ]; then
|
|
4 |
cat ERRORS
|
|
5 |
rm -f ERRORS
|
|
6 |
exit 1
|
|
7 |
fi
|
|
8 |
}
|
1 | 9 |
|
2 | 10 |
cd src
|
3 | 11 |
|
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 |
|
10 | 14 |
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 $?
|
12 | 17 |
|
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 |
|
19 | 20 |
echo "Testing direct threading build..."
|
20 | |
falderal -b test ../tests/Assembly.markdown ../tests/Term.markdown
|
|
21 |
falderal -b test $TESTS >ERRORS 2>&1 || error $?
|
21 | 22 |
|
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 |
|
28 | 25 |
echo "Testing 'tool' build..."
|
29 | |
falderal -b test ../tests/Assembly.markdown ../tests/Term.markdown
|
|
26 |
falderal -b test $TESTS >ERRORS 2>&1 || error $?
|
30 | 27 |
|
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 |
|
37 | 30 |
echo "Testing 'static' build..."
|
38 | |
falderal -b test ../tests/Assembly.markdown ../tests/Term.markdown
|
|
31 |
falderal -b test $TESTS >ERRORS 2>&1 || error $?
|
39 | 32 |
|
40 | 33 |
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 |
|
47 | 36 |
make clean
|
48 | 37 |
rm -f ERRORS
|
1 | 1 |
================
|
2 | 2 |
|
3 | 3 |
-> 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 |
|
6 | 6 |
-> Tests for functionality "Round-trip Kosheri Assembly"
|
7 | 7 |
|
8 | 8 |
| NEW_AR #10
|
|
116 | 116 |
=
|
117 | 117 |
|
118 | 118 |
-> 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 |
|
121 | 121 |
-> Tests for functionality "Run Kosheri Assembly"
|
122 | 122 |
|
123 | 123 |
Hello, world-ing
|
1 | 1 |
=============
|
2 | 2 |
|
3 | 3 |
-> 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 |
|
6 | 6 |
-> Tests for functionality "Freeze and Thaw Kosheri Term"
|
7 | 7 |
|
8 | 8 |
Freeze and thaw a well-formed, complex term.
|