From e96bc07b39a133db3fdda10e7860b1e7cc0adaae Mon Sep 17 00:00:00 2001 From: Mike Gerwitz Date: Fri, 21 Nov 2014 10:49:48 -0500 Subject: [PATCH] test/runner will now fail on non-fatal test errors --- test/runner | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/test/runner b/test/runner index 07bc80f..03bdf83 100755 --- a/test/runner +++ b/test/runner @@ -43,6 +43,16 @@ get-test-list() fi } +process-results() +{ + awk ' + BEGIN { status = 0 } + { print } + /^ FAILED$/ { status = 1 } + END { exit status } + ' +} + # xspec's output dir mkdir -p "$outdir" rm -f "$index" @@ -61,8 +71,12 @@ EOH declare -i status=0 while read spec; do echo "$spec" - ../tools/xspec/bin/xspec.sh "$spec" \ - || status=1 + ../tools/xspec/bin/xspec.sh "$spec" 2>&1 \ + | process-results + + if [ $? -ne 0 -o ${PIPESTATUS[1]} -ne 0 ]; then + status=1 + fi spec_path="$( dirname "$spec" )/xspec" result="$spec_path/$( basename "$spec" .xspec )-result.html"