aggregate coverage metrics of unit tests across packages (#115)
aggregate coverage metrics of unit tests across packages
diff --git a/script/coverage b/script/coverage
new file mode 100755
index 0000000..ab3a4f3
--- /dev/null
+++ b/script/coverage
@@ -0,0 +1,9 @@
+#!/bin/bash
+n=1
+for testpkg in $(go list ./testing ./.../testing); do
+ covpkg="${testpkg/"/testing"/}"
+ go test -covermode count -coverprofile "testing_"$n.coverprofile -coverpkg $covpkg $testpkg 2>/dev/null
+ n=$((n+1))
+done
+gocovmerge `ls *.coverprofile` > cover.out
+rm *.coverprofile