Skip to content

Commit

Permalink
check if no using -coverpkg change the result of global test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
loicalbertin committed Feb 28, 2018
1 parent 78b0752 commit 56acc3b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion build/coverage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ pkgs=$(go list ./...)
pkgsList=$(echo "${pkgs}" | tr '\n' ',' | sed -e 's@^\(.*\),$@\1@')
rm -f coverage.txt
for d in ${pkgs}; do
go test -coverprofile=${scriptDir}/profile.out -covermode=atomic -coverpkg="${pkgsList}" $d 2>&1 | grep -v "warning: no packages being tested depend on"
go test -coverprofile=${scriptDir}/profile.out -covermode=atomic $d 2>&1 | grep -v "warning: no packages being tested depend on"
if [ -f ${scriptDir}/profile.out ]; then
cat ${scriptDir}/profile.out >> coverage.txt
rm ${scriptDir}/profile.out
Expand Down

0 comments on commit 56acc3b

Please sign in to comment.