summaryrefslogtreecommitdiff
path: root/src/regression/simulate
diff options
context:
space:
mode:
Diffstat (limited to 'src/regression/simulate')
-rwxr-xr-xsrc/regression/simulate26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/regression/simulate b/src/regression/simulate
new file mode 100755
index 0000000..2ee28b9
--- /dev/null
+++ b/src/regression/simulate
@@ -0,0 +1,26 @@
+# SDCC test script for the PIC Port
+#
+USAGE="Usage: `basename $0` GPSIM_SCRIPT OUTPUT"
+
+if [ $# -lt 2 ] ; then
+ echo "$USAGE"
+ exit 1
+fi
+
+if [ "$GPSIM_PATH" != "" ] ; then
+ PATH=$GPSIM_PATH:$PATH
+fi
+
+GPSIM_SCRIPT=$1
+LOGFILE=$2
+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