From dbf654cf77434197016ba463b23979629737dfed Mon Sep 17 00:00:00 2001 From: Anthony Romano Date: Wed, 8 Mar 2017 22:24:16 -0800 Subject: [PATCH] test: install packages when building coverage tests Lots of repeated compilation. Cache results with go build -i. --- test | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test b/test index 0841f9770..16aace233 100755 --- a/test +++ b/test @@ -110,6 +110,8 @@ function cov_pass { # run code coverage for unit and integration tests for t in ${PKGS}; do 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 go test -covermode=set -coverpkg $PKGS_DELIM -timeout 15m -run=Test -v -coverprofile "$COVERDIR/${tf}.coverprofile" ${REPO_PATH}/$t done