aboutsummaryrefslogtreecommitdiffstats
path: root/tests/testall
diff options
context:
space:
mode:
Diffstat (limited to 'tests/testall')
-rwxr-xr-xtests/testall38
1 files changed, 38 insertions, 0 deletions
diff --git a/tests/testall b/tests/testall
new file mode 100755
index 0000000..15bb2d1
--- /dev/null
+++ b/tests/testall
@@ -0,0 +1,38 @@
+#!/bin/sh
+
+echo executing self tests...
+echo "=================================================================" > ../testlog
+echo "Summaric results:" >> ../testlog
+SUMPASS="0"
+SUMFAIL="0"
+if [ "$1" = "" ]; then
+ SUBDIRS=t_*
+else
+ SUBDIRS="$1"
+fi
+for t in $SUBDIRS; do
+ cd $t
+ cat $t.doc
+ ../../asl `cat asflags` -i ../../include $t.asm | tee $t.log
+ ../../p2bin -k -l 0 -r 0x-0x $t
+ echo +---------------------------------------------------------------+
+ if cmp $t.ori $t.bin; then
+ echo "Test $t succeeded!"
+ SUMPASS=`expr $SUMPASS + 1`
+ echo "$t : OK" >> ../../testlog
+ else
+ echo "Test $t failed!"
+ SUMFAIL=`expr $SUMFAIL + 1`
+ echo "$t : failed" >> ../../testlog
+ fi
+ grep assembly $t.log >> ../../testlog
+ grep Assemblierzeit $t.log >> ../../testlog
+ echo +---------------------------------------------------------------+
+ rm -f $t.bin
+ rm -f $t.log
+ rm -f $t.h
+ cd ..
+done
+echo "successes: $SUMPASS" >> ../testlog
+echo "failures : $SUMFAIL" >> ../testlog
+cat ../testlog