diff options
Diffstat (limited to 'test-suite/failures.sh')
-rwxr-xr-x | test-suite/failures.sh | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/test-suite/failures.sh b/test-suite/failures.sh new file mode 100755 index 0000000..c89a488 --- /dev/null +++ b/test-suite/failures.sh @@ -0,0 +1,26 @@ +#!/usr/bin/env bash + +# This script gathers the failures of a test.log after running the test-suite +# and shows in an easier to understand way. It's meant to be used by run.sh + +if [[ $1 = '' ]]; then + echo "syntax: $0 test.log" + exit -1 +fi +LOG=$1 +DIR="`pwd`/sandbox/test-[^/]\+/" + +grep "TEST-FAIL" $1 | awk '{print $3}' | sed 's%'$DIR'%%' | sort -u > .log + +RET=0 +if [ -s .log ]; then + COUNT=`wc -l .log | awk '{print $1}'` + echo "=========== $COUNT Failures ==============" + cat .log + echo + echo "=========== Full Log ==============" + egrep "(: error:)|(TEST-FAIL)" $LOG | grep -v "llvm\.o" | uniq + RET=1 +fi +rm .log +exit $RET |