From: Hugo Villeneuve Date: Sun, 26 Jan 2014 04:39:27 +0000 (-0500) Subject: Return error for test files without any validation condition X-Git-Tag: v2.0.1~39 X-Git-Url: http://gitweb.hugovil.com/?p=emu8051.git;a=commitdiff_plain;h=b470088f1c0ffb7b948e7bf02d82133fe480516a Return error for test files without any validation condition --- diff --git a/tests/opcodes.sh b/tests/opcodes.sh index 3ae17fd..57ff3db 100755 --- a/tests/opcodes.sh +++ b/tests/opcodes.sh @@ -17,8 +17,12 @@ if test $? -ne 0 ; then return 1 fi +test_output_found=0 + while read line; do if echo ${line} | grep -q "; Test output"; then + test_output_found=1 + test_str=$(echo ${line} | sed "s/^; Test output: //") if ! grep -q "${test_str}" ${lf}; then @@ -28,4 +32,9 @@ while read line; do fi done < ${name}.asm +if [ x"${test_output_found}" == x0 ]; then + # Need at least one test output condition to verify correct operation + exit 1 +fi + exit 0