testing/kokoro: run `go get` with -d
d stops after downloading the packages, skipping installation.
@@ -45,7 +45,8 @@ fi
! grep -R '"context"$' * || { echo "Use golang.org/x/net/context"; false; }
# Download imports.
-time go get -u -v $(go list -f '{{join .Imports "\n"}}{{"\n"}}{{join .TestImports "\n"}}' ./... | sort | uniq | grep -v golang-samples)
+GO_IMPORTS=$(go list -f '{{join .Imports "\n"}}{{"\n"}}{{join .TestImports "\n"}}' ./... | sort | uniq | grep -v golang-samples)
+time go get -u -v -d $GO_IMPORTS
# Pin go-sql-driver/mysql to v1.3 (which supports Go 1.6)
if go version | grep go1\.6\.; then
@@ -54,6 +55,8 @@ if go version | grep go1\.6\.; then
popd;
fi
+go install -v $GO_IMPORTS
+
date
# Run all of the tests
