Created
July 24, 2018 08:51
-
-
Save mstssk/3c0c74bac0e454bae32c56ca4d882b5e to your computer and use it in GitHub Desktop.
任意のGoのテストのカバレッジを抜くやつ
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
#!sh -eux | |
cd `dirname $0`/../server | |
GOPATH=$GOPATH:`pwd` | |
cd src/ | |
out1=$(mktemp) | |
out2=$(mktemp) | |
html=$(mktemp) | |
mv $html $html.html | |
html=$html.html | |
gb gae test -v -tags=testerator -coverprofile=$out1 testPackage -run TestFoobar | |
echo "mode: set" > $out2 | |
cat $out1 | grep "target_file_name" >> $out2 | |
go tool cover -html=$out2 -o $html | |
open $html |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment