mirror of
https://github.com/v2fly/v2ray-core.git
synced 2025-01-09 10:57:20 -05:00
fix for travis env
This commit is contained in:
parent
184560883f
commit
c598e229a9
@ -3,7 +3,7 @@
|
|||||||
FAIL=0
|
FAIL=0
|
||||||
|
|
||||||
function test_package {
|
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=$(go list -f '{{ join .Deps "\n" }}' $DIR | grep v2ray | tr '\n' ',')
|
||||||
DEP=${DEP}$DIR
|
DEP=${DEP}$DIR
|
||||||
go test -coverprofile=coversingle.out -coverpkg=$DEP $DIR || FAIL=1
|
go test -coverprofile=coversingle.out -coverpkg=$DEP $DIR || FAIL=1
|
||||||
@ -13,11 +13,9 @@ function test_package {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
pushd $GOPATH/src/
|
|
||||||
|
|
||||||
touch coverall.out
|
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)
|
TEST_FILES=($DIR/*_test.go)
|
||||||
if [ -f ${TEST_FILES[0]} ]; then
|
if [ -f ${TEST_FILES[0]} ]; then
|
||||||
test_package $DIR
|
test_package $DIR
|
||||||
@ -34,6 +32,4 @@ fi
|
|||||||
|
|
||||||
rm -f coverall.out
|
rm -f coverall.out
|
||||||
|
|
||||||
popd
|
|
||||||
|
|
||||||
exit $FAIL
|
exit $FAIL
|
||||||
|
Loading…
Reference in New Issue
Block a user