Renato Golin | 94cc104 | 2016-04-26 11:02:23 +0100 | [diff] [blame] | 1 | #!/usr/bin/env bash |
| 2 | |
| 3 | # This script gathers the failures of a test.log after running the test-suite |
| 4 | # and shows in an easier to understand way. It's meant to be used by run.sh |
| 5 | |
| 6 | if [[ $1 = '' ]]; then |
| 7 | echo "syntax: $0 test.log" |
| 8 | exit -1 |
| 9 | fi |
| 10 | LOG=$1 |
| 11 | DIR="`pwd`/sandbox/test-[^/]\+/" |
| 12 | |
| 13 | grep "TEST-FAIL" $1 | awk '{print $3}' | sed 's%'$DIR'%%' | sort -u > .log |
| 14 | |
| 15 | RET=0 |
| 16 | if [ -s .log ]; then |
| 17 | COUNT=`wc -l .log | awk '{print $1}'` |
| 18 | echo "=========== $COUNT Failures ==============" |
| 19 | cat .log |
| 20 | echo |
| 21 | echo "=========== Full Log ==============" |
| 22 | egrep "(: error:)|(TEST-FAIL)" $LOG | grep -v "llvm\.o" | uniq |
| 23 | RET=1 |
| 24 | fi |
| 25 | rm .log |
| 26 | exit $RET |