diff --git a/Makefile b/Makefile index 5a0644deb..a32466238 100644 --- a/Makefile +++ b/Makefile @@ -49,11 +49,7 @@ test-integration: .gopath all.cov: .gopath cd $(BASEPATH) && \ - go list ./... | \ - while read pkg; do \ - go test -covermode=count -coverprofile=$$(base64 <<< $$pkg).cov $$pkg; \ - done - echo "mode: count" > all.cov; tail -q -n +2 *.cov >> all.cov + ./coverage_all.sh all.cov env: @echo export GOPATH=\"$(GOPATH)\" diff --git a/coverage_all.sh b/coverage_all.sh new file mode 100755 index 000000000..552387e41 --- /dev/null +++ b/coverage_all.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +TARGETFILE="$1" + +go list ./... | while read pkg; do + go test -covermode=count -coverprofile=$(base64 <<< $pkg).cov $pkg +done + +echo "mode: count" > $TARGETFILE +tail -q -n +2 *.cov >> $TARGETFILE