Created
July 29, 2016 03:29
-
-
Save subosito/bc68355decc59b2eb03dbde9e12ef864 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "mode: count" > coverage.out | |
PACKAGES=`govendor list -no-status +local` | |
EXIT_CODE=0 | |
for PKG in $PACKAGES; do | |
echo =-= $PKG | |
govendor test -v -coverprofile=profile.out -covermode=count $PKG; __EXIT_CODE__=$? | |
if [ "$__EXIT_CODE__" -ne "0" ]; then | |
EXIT_CODE=$__EXIT_CODE__ | |
fi | |
if [ -f profile.out ]; then | |
tail -n +2 profile.out >> coverage.out; rm profile.out | |
fi | |
done | |
exit $EXIT_CODE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment