source: liacs/coco/assignment4/testall.sh@ 287

Last change on this file since 287 was 2, checked in by Rick van der Zwet, 15 years ago

Initial import of data of old repository ('data') worth keeping (e.g. tracking
means of URL access statistics)

File size: 743 bytes
Line 
1#!/bin/sh
2#
3# Trivial debug script, display test case, compile and run, and display
4# testcase again
5
6PROG="./comp"
7ASMFILE="./out.s"
8TMPFILE=`mktemp -t $(basename $0).XXXXXX`
9
10trap "rm $TMPFILE" 1 0
11
12make all
13if [ $? -eq 0 ]; then
14 for TESTFILE in `find ../tests/ -type f -regex ".*\.p[01]"`; do
15 ARGS=" -O0"
16 echo "Testing: $TESTFILE"
17 $PROG $ARGS < $TESTFILE 2>/dev/null 1>/dev/null
18 (echo 2; echo 3) | spim -f $ASMFILE 2>$TMPFILE 1>/dev/null
19 grep -q -e 'syntax error' $TMPFILE
20 if [ $? -eq 0 ]; then
21 cat $TMPFILE
22 echo "File processing: $TESTFILE"
23 echo "===BEGIN CODE ==="
24 cat $TESTFILE
25 echo "===END CODE ==="
26 echo "=== ASSEMBLY CODE =="
27 cat $ASMFILE
28 echo "=== END ASSEMBLY CODE ==="
29 exit 1
30 fi
31 done
32fi
Note: See TracBrowser for help on using the repository browser.