1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-09-26 13:56:12 -04:00

fix for travis env

This commit is contained in:
V2Ray 2015-09-26 23:36:25 +02:00
parent 184560883f
commit c598e229a9

View File

@ -3,7 +3,7 @@
FAIL=0
function test_package {
DIR="$1"
DIR="github.com/v2ray/v2ray-core/$1"
DEP=$(go list -f '{{ join .Deps "\n" }}' $DIR | grep v2ray | tr '\n' ',')
DEP=${DEP}$DIR
go test -coverprofile=coversingle.out -coverpkg=$DEP $DIR || FAIL=1
@ -13,11 +13,9 @@ function test_package {
fi
}
pushd $GOPATH/src/
touch coverall.out
for DIR in $(find github.com/v2ray/v2ray-core -type d -not -path "*.git*"); do
for DIR in $(find * -type d -not -path "*.git*"); do
TEST_FILES=($DIR/*_test.go)
if [ -f ${TEST_FILES[0]} ]; then
test_package $DIR
@ -34,6 +32,4 @@ fi
rm -f coverall.out
popd
exit $FAIL