Skip to content

Commit

Permalink
Tee the test result to the Travis output
Browse files Browse the repository at this point in the history
  • Loading branch information
0x6e6562 committed Oct 30, 2014
1 parent 648b9bd commit 5834cd1
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions integration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,9 @@ function run_tests() {
proto=1
fi

go test -tags integration -cover -v -runssl -proto=$proto -rf=3 -cluster=$(ccm liveset) -clusterSize=$clusterSize -autowait=2000ms ./... > results
go test -tags integration -cover -v -runssl -proto=$proto -rf=3 -cluster=$(ccm liveset) -clusterSize=$clusterSize -autowait=2000ms ./... | tee results.txt

cat results
cover=`cat results | grep coverage: | grep -o "[0-9]\{1,3\}" | head -n 1`
cover=`cat results.txt | grep coverage: | grep -o "[0-9]\{1,3\}" | head -n 1`
if [[ $cover -lt "60" ]]; then
echo "--- FAIL: expected coverage of at least 60 %, but coverage was $cover %"
exit 1
Expand Down

0 comments on commit 5834cd1

Please sign in to comment.