Skip to content

Commit

Permalink
Merge commit 'ddf3c20edf0b870de7c6569a9bf4f6a8fdc636fd' into use-vend…
Browse files Browse the repository at this point in the history
…or-dir
  • Loading branch information
pohly committed Nov 4, 2019
2 parents 3fe66b5 + ddf3c20 commit d329e2d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
4 changes: 2 additions & 2 deletions release-tools/build.make
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,13 @@ test: check-go-version-go
test: test-go
test-go:
@ echo; echo "### $@:"
go test $(GOFLAGS_VENDOR) `go list ./... | grep -v -e 'vendor' -e '/test/e2e$$' $(TEST_GO_FILTER_CMD)` $(TESTARGS)
go test $(GOFLAGS_VENDOR) `go list $(GOFLAGS_VENDOR) ./... | grep -v -e 'vendor' -e '/test/e2e$$' $(TEST_GO_FILTER_CMD)` $(TESTARGS)

.PHONY: test-vet
test: test-vet
test-vet:
@ echo; echo "### $@:"
go test $(GOFLAGS_VENDOR) `go list ./... | grep -v vendor $(TEST_VET_FILTER_CMD)`
go test $(GOFLAGS_VENDOR) `go list $(GOFLAGS_VENDOR) ./... | grep -v vendor $(TEST_VET_FILTER_CMD)`

.PHONY: test-fmt
test: test-fmt
Expand Down
11 changes: 7 additions & 4 deletions release-tools/prow.sh
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,10 @@ get_versioned_variable () {
echo "$value"
}

# If we have a vendor directory, then use it.
# If we have a vendor directory, then use it. We must be careful to only
# use this for "make" invocations inside the project's repo itself because
# setting it globally can break other go usages (like "go get <some command>"
# which is disabled with GOFLAGS-mod=vendor).
configvar GOFLAGS_VENDOR "$( [ -d vendor ] && echo '-mod=vendor' )" "Go flags for using the vendor directory"

# Go versions can be specified seperately for different tasks
Expand Down Expand Up @@ -931,7 +934,7 @@ main () {
images=
if ${CSI_PROW_BUILD_JOB}; then
# A successful build is required for testing.
run_with_go "${CSI_PROW_GO_VERSION_BUILD}" make all GOFLAGS_VENDOR=${GOFLAGS_VENDOR} || die "'make all' failed"
run_with_go "${CSI_PROW_GO_VERSION_BUILD}" make all "GOFLAGS_VENDOR=${GOFLAGS_VENDOR}" || die "'make all' failed"
# We don't want test failures to prevent E2E testing below, because the failure
# might have been minor or unavoidable, for example when experimenting with
# changes in "release-tools" in a PR (that fails the "is release-tools unmodified"
Expand All @@ -941,13 +944,13 @@ main () {
warn "installing 'dep' failed, cannot test vendoring"
ret=1
fi
if ! run_with_go "${CSI_PROW_GO_VERSION_BUILD}" make -k test GOFLAGS_VENDOR=${GOFLAGS_VENDOR} 2>&1 | make_test_to_junit; then
if ! run_with_go "${CSI_PROW_GO_VERSION_BUILD}" make -k test "GOFLAGS_VENDOR=${GOFLAGS_VENDOR}" 2>&1 | make_test_to_junit; then
warn "'make test' failed, proceeding anyway"
ret=1
fi
fi
# Required for E2E testing.
run_with_go "${CSI_PROW_GO_VERSION_BUILD}" make container GOFLAGS_VENDOR=${GOFLAGS_VENDOR} || die "'make container' failed"
run_with_go "${CSI_PROW_GO_VERSION_BUILD}" make container "GOFLAGS_VENDOR=${GOFLAGS_VENDOR}" || die "'make container' failed"
fi

if tests_need_kind; then
Expand Down

0 comments on commit d329e2d

Please sign in to comment.