blob: c89a488fb2c4994eaf76be130efacb4c359a5f89 [file] [log] [blame]
Renato Golin94cc1042016-04-26 11:02:23 +01001#!/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
6if [[ $1 = '' ]]; then
7 echo "syntax: $0 test.log"
8 exit -1
9fi
10LOG=$1
11DIR="`pwd`/sandbox/test-[^/]\+/"
12
13grep "TEST-FAIL" $1 | awk '{print $3}' | sed 's%'$DIR'%%' | sort -u > .log
14
15RET=0
16if [ -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
24fi
25rm .log
26exit $RET