X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fregression%2Fsimulate;h=2ee28b90ab0be7edab6e3a51f890d3425fc604d9;hb=503506adabdfdde204ab0fc7daeed9f9105ca460;hp=548d3dbd262fc5186ca9a68a32ebaa06fb657771;hpb=778f1b919b8f1bc96249966828c4b7b209d1b212;p=fw%2Fsdcc diff --git a/src/regression/simulate b/src/regression/simulate index 548d3dbd..2ee28b90 100755 --- a/src/regression/simulate +++ b/src/regression/simulate @@ -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