test/runner will now fail on non-fatal test errors

master
Mike Gerwitz 2014-11-21 10:49:48 -05:00
parent f50c2299fa
commit e96bc07b39
1 changed files with 16 additions and 2 deletions

View File

@ -43,6 +43,16 @@ get-test-list()
fi fi
} }
process-results()
{
awk '
BEGIN { status = 0 }
{ print }
/^ FAILED$/ { status = 1 }
END { exit status }
'
}
# xspec's output dir # xspec's output dir
mkdir -p "$outdir" mkdir -p "$outdir"
rm -f "$index" rm -f "$index"
@ -61,8 +71,12 @@ EOH
declare -i status=0 declare -i status=0
while read spec; do while read spec; do
echo "$spec" echo "$spec"
../tools/xspec/bin/xspec.sh "$spec" \ ../tools/xspec/bin/xspec.sh "$spec" 2>&1 \
|| status=1 | process-results
if [ $? -ne 0 -o ${PIPESTATUS[1]} -ne 0 ]; then
status=1
fi
spec_path="$( dirname "$spec" )/xspec" spec_path="$( dirname "$spec" )/xspec"
result="$spec_path/$( basename "$spec" .xspec )-result.html" result="$spec_path/$( basename "$spec" .xspec )-result.html"