* device/include/pic16/pic18f*.h: add bit aliases in INTCONbits_t
[fw/sdcc] / src / regression / simulate
index 548d3dbd262fc5186ca9a68a32ebaa06fb657771..2ee28b90ab0be7edab6e3a51f890d3425fc604d9 100755 (executable)
@@ -7,15 +7,20 @@ if [ $# -lt 2 ] ; then
   exit 1
 fi
 
+if [ "$GPSIM_PATH" != "" ] ; then
+  PATH=$GPSIM_PATH:$PATH
+fi
 
 GPSIM_SCRIPT=$1
 LOGFILE=$2
-touch $2
-echo "Test $GPSIM_SCRIPT" >> $LOGFILE
-gpsim --cli -c $GPSIM_SCRIPT $2> test
-grep "success " test | grep "= 0x0"
-if [ $? -eq 0 ] ; then
-  echo "PASSED" >> $LOGFILE
-else
-  echo "FAILED" >> $LOGFILE
-fi
\ No newline at end of file
+echo "Test $GPSIM_SCRIPT" | tee -a $LOGFILE
+gpsim --cli -c $GPSIM_SCRIPT | tee -a $LOGFILE |\
+sed -n -e '/running\.\.\./,$ {
+/^ *Message:/ {
+s/^ *Message:\(.*\)$/\1/p
+q
+}
+}
+$ a\
+===> FAILED
+' | tee -a $LOGFILE