瀏覽代碼

Pass through GOCACHE to test_env

Otherwise the cache gets written to bundles instead of to the volume
that we setup in the Makefile as expected.

Found this because vscode did not like having these huge objects in
bundles/ (didn't harm anything, just that it noticed and said hey I don't
like that).

This enables cache-reuse when building the test binaries.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Brian Goff 4 年之前
父節點
當前提交
1a1f5cc37b
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      hack/make/.integration-test-helpers

+ 2 - 0
hack/make/.integration-test-helpers

@@ -16,6 +16,7 @@ source "${MAKEDIR}/.go-autogen"
 : "${TEST_REPEAT:=1}"
 : "${TEST_REPEAT:=1}"
 : "${TESTFLAGS:=}"
 : "${TESTFLAGS:=}"
 : "${TESTDEBUG:=}"
 : "${TESTDEBUG:=}"
+: "${GOCACHE:=$(go env GOCACHE)}"
 
 
 setup_integration_test_filter() {
 setup_integration_test_filter() {
 	if [ -z "${TEST_FILTER}" ]; then
 	if [ -z "${TEST_FILTER}" ]; then
@@ -149,6 +150,7 @@ test_env() {
 			DOCKER_REMOTE_DAEMON="$DOCKER_REMOTE_DAEMON" \
 			DOCKER_REMOTE_DAEMON="$DOCKER_REMOTE_DAEMON" \
 			DOCKER_ROOTLESS="$DOCKER_ROOTLESS" \
 			DOCKER_ROOTLESS="$DOCKER_ROOTLESS" \
 			DOCKERFILE="$DOCKERFILE" \
 			DOCKERFILE="$DOCKERFILE" \
+			GOCACHE="$GOCACHE" \
 			GOPATH="$GOPATH" \
 			GOPATH="$GOPATH" \
 			GOTRACEBACK=all \
 			GOTRACEBACK=all \
 			HOME="$ABS_DEST/fake-HOME" \
 			HOME="$ABS_DEST/fake-HOME" \