From 4a84697b7d5ceaa23b0f382d6c568266536172c0 Mon Sep 17 00:00:00 2001 From: John Bowler Date: Wed, 6 Jul 2016 19:17:35 -0700 Subject: [PATCH] Support `make test` if TF itself is vendored --- Makefile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 1603ce214..358a03af5 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -TEST?=$$(go list ./... | grep -v '/vendor/' | grep -v '/builtin/bins/') +TEST?=$$(go list ./... | grep -v '/terraform/vendor/' | grep -v '/builtin/bins/') VETARGS?=-all GOFMT_FILES?=$$(find . -name '*.go' | grep -v vendor) @@ -29,7 +29,8 @@ core-dev: generate # Shorthand for quickly testing the core of Terraform (i.e. "not providers") core-test: generate - @echo "Testing core packages..." && go test -tags 'core' $(TESTARGS) $(shell go list ./... | grep -v -E 'builtin|vendor') + @echo "Testing core packages..." && \ + go test -tags 'core' $(TESTARGS) $(shell go list ./... | grep -v -E 'builtin|terraform/vendor') # Shorthand for building and installing just one plugin for local testing. # Run as (for example): make plugin-dev PLUGIN=provider-aws @@ -79,7 +80,7 @@ generate: @which stringer ; if [ $$? -ne 0 ]; then \ go get -u golang.org/x/tools/cmd/stringer; \ fi - go generate $$(go list ./... | grep -v /vendor/) + go generate $$(go list ./... | grep -v /terraform/vendor/) @go fmt command/internal_plugin_list.go > /dev/null fmt: