fix(tests): replace gocovmerge with a simple bash script

This commit is contained in:
Łukasz Mierzwa
2020-04-09 09:17:15 +01:00
parent 277b24db0d
commit 25413fb769
5 changed files with 7 additions and 8 deletions
+6 -1
View File
@@ -3,7 +3,12 @@
set -o errexit
set -o pipefail
gocovmerge profile.* | grep -vE '^github.com/prymitive/karma/cmd/karma/bindata_assetfs.go:' > coverage.txt
echo "mode: set" > coverage.txt
cat profile.* \
| grep -v mode: \
| grep -vE '^github.com/prymitive/karma/cmd/karma/bindata_assetfs.go:' \
| sort -r \
| awk '{if($1 != last) {print $0;last=$1}}' >> coverage.txt
rm -f profile.*
go tool cover -func coverage.txt | tail -n 1 | awk '{print $3}'