| #!/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 |