mirror of https://github.com/v2ray/v2ray-core
				
				
				
			fix for travis env
							parent
							
								
									184560883f
								
							
						
					
					
						commit
						c598e229a9
					
				| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue