소스 검색

test: install packages when building coverage tests

Lots of repeated compilation. Cache results with go build -i.
Anthony Romano 8 년 전
부모
커밋
dbf654cf77
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      test

+ 2 - 0
test

@@ -110,6 +110,8 @@ function cov_pass {
 	# run code coverage for unit and integration tests
 	# run code coverage for unit and integration tests
 	for t in ${PKGS}; do
 	for t in ${PKGS}; do
 		tf=`echo $t | tr / _`
 		tf=`echo $t | tr / _`
+		# cache package compilation data for faster repeated builds
+		go test -covermode=set -coverpkg $PKGS_DELIM -i -v ${REPO_PATH}/$t
 		# uses -run=Test to skip examples because clientv3/ example tests will leak goroutines
 		# uses -run=Test to skip examples because clientv3/ example tests will leak goroutines
 		go test -covermode=set -coverpkg $PKGS_DELIM -timeout 15m -run=Test -v -coverprofile "$COVERDIR/${tf}.coverprofile"  ${REPO_PATH}/$t
 		go test -covermode=set -coverpkg $PKGS_DELIM -timeout 15m -run=Test -v -coverprofile "$COVERDIR/${tf}.coverprofile"  ${REPO_PATH}/$t
 	done
 	done