From: Michael Urman Date: Sat, 16 Mar 2002 22:19:16 +0000 (-0000) Subject: Catch "errors" and update report format X-Git-Tag: v0.1.0~34 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=86e1c8338ccac3486476984b501f7271f1b190af;p=yasm Catch "errors" and update report format svn path=/trunk/yasm/; revision=506 --- diff --git a/modules/preprocs/yapp/tests/yapp_test.sh b/modules/preprocs/yapp/tests/yapp_test.sh index e3137f9f..f555fd19 100755 --- a/modules/preprocs/yapp/tests/yapp_test.sh +++ b/modules/preprocs/yapp/tests/yapp_test.sh @@ -9,8 +9,10 @@ passedct=0 passedlist='' failedct=0 failedlist='' +errorct=0 +errorlist='' -YT=" - YAPP_TEST" +YT="yapp_test" for asm in ${srcdir}/src/preprocs/yapp/tests/*.asm @@ -19,19 +21,29 @@ do y=${a}.yp p=`echo ${asm} | sed -e 's,.asm$,.pre,'` - echo "$YT: Testing yapp for ${a}" - ./yasm -e ${asm} > ${y} - if diff -w ${p} ${y} > /dev/null; then - passedct=`expr $passedct + 1` - passedlist="${passedlist}${a} " + echo -n "$YT: Testing yapp for ${a} ..." + if ./yasm -e ${asm} > ${y}; then + if diff -w ${p} ${y} > /dev/null; then + echo " PASS." + passedct=`expr $passedct + 1` + passedlist="${passedlist}${a} " + else + echo " FAIL." + failedct=`expr $failedct + 1` + failedlist="${failedlist}${a} " + fi else - failedct=`expr $failedct + 1` - failedlist="${failedlist}${a} " + errorct=`expr $errorct + 1` + errorlist="${errorlist}${a} " fi - #rm ${y} done -test $passedct -gt 0 && echo "$YT: PASSED $passedct: $passedlist" -test $failedct -gt 0 && echo "$YT: FAILED $failedct: $failedlist" +ct=`expr $failedct + $passedct + $errorct` +per=`expr 100 \* $passedct / $ct` -exit $failedct +echo "$YT: $per%: Checks: $ct, Failures $failedct, Errors: $errorct" +#test $passedct -gt 0 && echo "$YT: PASSED $passedct: $passedlist" +#test $failedct -gt 0 && echo "$YT: FAILED $failedct: $failedlist" +#test $errorct -gt 0 && echo "$YT: ERRORED $errorct: $errorlist" + +exit `expr $failedct + $errorct` diff --git a/src/preprocs/yapp/tests/yapp_test.sh b/src/preprocs/yapp/tests/yapp_test.sh index e3137f9f..f555fd19 100755 --- a/src/preprocs/yapp/tests/yapp_test.sh +++ b/src/preprocs/yapp/tests/yapp_test.sh @@ -9,8 +9,10 @@ passedct=0 passedlist='' failedct=0 failedlist='' +errorct=0 +errorlist='' -YT=" - YAPP_TEST" +YT="yapp_test" for asm in ${srcdir}/src/preprocs/yapp/tests/*.asm @@ -19,19 +21,29 @@ do y=${a}.yp p=`echo ${asm} | sed -e 's,.asm$,.pre,'` - echo "$YT: Testing yapp for ${a}" - ./yasm -e ${asm} > ${y} - if diff -w ${p} ${y} > /dev/null; then - passedct=`expr $passedct + 1` - passedlist="${passedlist}${a} " + echo -n "$YT: Testing yapp for ${a} ..." + if ./yasm -e ${asm} > ${y}; then + if diff -w ${p} ${y} > /dev/null; then + echo " PASS." + passedct=`expr $passedct + 1` + passedlist="${passedlist}${a} " + else + echo " FAIL." + failedct=`expr $failedct + 1` + failedlist="${failedlist}${a} " + fi else - failedct=`expr $failedct + 1` - failedlist="${failedlist}${a} " + errorct=`expr $errorct + 1` + errorlist="${errorlist}${a} " fi - #rm ${y} done -test $passedct -gt 0 && echo "$YT: PASSED $passedct: $passedlist" -test $failedct -gt 0 && echo "$YT: FAILED $failedct: $failedlist" +ct=`expr $failedct + $passedct + $errorct` +per=`expr 100 \* $passedct / $ct` -exit $failedct +echo "$YT: $per%: Checks: $ct, Failures $failedct, Errors: $errorct" +#test $passedct -gt 0 && echo "$YT: PASSED $passedct: $passedlist" +#test $failedct -gt 0 && echo "$YT: FAILED $failedct: $failedlist" +#test $errorct -gt 0 && echo "$YT: ERRORED $errorct: $errorlist" + +exit `expr $failedct + $errorct`