-
Notifications
You must be signed in to change notification settings - Fork 0
/
TESTS
executable file
·45 lines (37 loc) · 971 Bytes
/
TESTS
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/bin/sh
FAILS=""
TESTFILES="tokutil.py tokenizer.py astokens.py expression.py segment.py parsetests.py"
# the tests that assemble the v7 'as' source and compare the results
# to a known-good binary file (from running the assembly under simh/unix7)
# can only be run if the source files for 'as' and the 'golden binaries'
# are present... if this subdirectory exists it is presumed to contain them:
V7_AS_TESTDIR="V7TEST"
if [ -e $V7_AS_TESTDIR ]
then
TESTFILES="$TESTFILES v7astest.py"
fi
COUNT_GOOD=0
COUNT_BAD=0
for TEST in $TESTFILES
do
echo "Testing $TEST"
python3 $TEST
if [ $? -eq 0 ]
then
COUNT_GOOD=`expr $COUNT_GOOD + 1`
else
echo TEST $TEST failed
FAILS="$TEST $FAILS"
COUNT_BAD=`expr $COUNT_BAD + 1`
fi
done
if [ $COUNT_BAD -eq 0 ]
then
COUNT_GOOD="$COUNT_GOOD (all)"
fi
echo RESULTS: $COUNT_GOOD module suites passed, $COUNT_BAD failed.
if [ x"$FAILS" != x ]
then
echo "**TEST FAILURES: $FAILS"
exit 1
fi