mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-12-30 05:56:54 -05:00
coverall script
This commit is contained in:
parent
bdeee46839
commit
7f54ba8f6b
@ -7,13 +7,10 @@ go:
|
||||
before_install:
|
||||
- go get github.com/axw/gocov/gocov
|
||||
- go get golang.org/x/tools/cmd/cover
|
||||
- go get github.com/modocache/gover
|
||||
- go get github.com/mattn/goveralls
|
||||
|
||||
script:
|
||||
- for d in $(find -type d -printf './%P\n'); do echo go test -v -coverprofile=cover.coverprofile $d; done
|
||||
- gover
|
||||
- $HOME/gopath/bin/goveralls -coverprofile=gover.coverprofile -service=travis-ci -repotoken $COVERALLS_TOKEN
|
||||
- ./testing/coverage/coverall
|
||||
|
||||
env:
|
||||
secure: "nnEiGTuS8SsSFRpxUsPh6hmx/OfPDA6AO3OX7IpjPCbkQnjuFEsm3DfPEZOHTiYra00Ea3bNw9ePLPqyWdLAPmcLoUBhWRyfevt9m3jrbyrT8O9MCXNDY6i1ll3E43nx8kxRDF1QbYaSK4jppa8Vu2vyZH5+GiS0JVcw/7CfX8TyUMbDuyaQXYQ1kwixlThQZH43xxQ7u5CFF1pBFdwpkuDm2/wKUE+0CGZOeWzUYI8h1in4eY0Vse4Zt4GqS2eywf4rw12bBysZ21UnT/xu990m5nzAScbUGjloplJNpdZGtD8SBTGujZBMMUzKi/E0zJkdEf37MZ9rsarfv6v9khdwTp/8VoAiZxpG1IDISIu0TClAjw8NYO5hmuF01/oJexMuxqRhMPwbk1nPsustlBKEG3zjvW5yILMkiaRl67Pj+9h21zMGYmwPGka7Ollh9ki2h17RFNuj9Yxm5XX2xvZDIvtxL1a8S50vv7VZTT9rrrFMhGP7ty9gj2opjJ7QBgwi2W/eVGhfshfnZJjJ7Bqf+gl1MDOYcTlqmFe5JvKdIO9mN7gskJizmeFxh31LrZ2sCY71/iicGj7gZJ4e/u2/dI2OVfFWTTbHoiIyCLvvrA18zBF9Sky1Y3QDj85GdRtC0SI6TXJLAIa7jNgF6Nr2mAg044DaX9VW0VH0VnE="
|
25
testing/coverage/coverall
Normal file
25
testing/coverage/coverall
Normal file
@ -0,0 +1,25 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "mode: set" > coverall.out
|
||||
fail=0
|
||||
|
||||
for dir in $(find . -maxdepth 10 -not -path './.git*' -type d);
|
||||
do
|
||||
if ls $dir/*.go &> /dev/null; then
|
||||
go test -coverprofile=coversingle.out $dir || fail=1
|
||||
if [ -f coversingle.out ]
|
||||
then
|
||||
cat coversingle.out | grep -v "mode: set" >> coverall.out
|
||||
rm coversingle.out
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
if [ "$fail" -eq 0 ]
|
||||
then
|
||||
$HOME/gopath/bin/goveralls -v -coverprofile=acc.out -service=travis-ci -repotoken $COVERALLS_TOKEN
|
||||
fi
|
||||
|
||||
rm -f coverall.out
|
||||
|
||||
exit $fail
|
Loading…
Reference in New Issue
Block a user