55c60bd5e4382fd6d7cfd3cb8b01588a5ba73877
[fw/sdcc] / src / regression / simulate
1 # SDCC test script for the PIC Port
2
3 USAGE="Usage: `basename $0` GPSIM_SCRIPT OUTPUT"
4
5 if [ $# -lt 2 ] ; then
6   echo "$USAGE"
7   exit 1
8 fi
9
10
11 GPSIM_SCRIPT=$1
12 LOGFILE=$2
13 touch $2
14 echo "Test $GPSIM_SCRIPT" >> $LOGFILE
15 gpsim --cli -c $GPSIM_SCRIPT $2> test
16 grep "failures " test | grep "= 0x0"
17 if [ $? -eq 0 ] ; then
18   echo "PASSED" >> $LOGFILE
19 else
20   echo "FAILED" >> $LOGFILE
21 fi