Support `make test` if TF itself is vendored
This commit is contained in:
parent
21e2173e0a
commit
4a84697b7d
7
Makefile
7
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
|
VETARGS?=-all
|
||||||
GOFMT_FILES?=$$(find . -name '*.go' | grep -v vendor)
|
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")
|
# Shorthand for quickly testing the core of Terraform (i.e. "not providers")
|
||||||
core-test: generate
|
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.
|
# Shorthand for building and installing just one plugin for local testing.
|
||||||
# Run as (for example): make plugin-dev PLUGIN=provider-aws
|
# Run as (for example): make plugin-dev PLUGIN=provider-aws
|
||||||
|
@ -79,7 +80,7 @@ generate:
|
||||||
@which stringer ; if [ $$? -ne 0 ]; then \
|
@which stringer ; if [ $$? -ne 0 ]; then \
|
||||||
go get -u golang.org/x/tools/cmd/stringer; \
|
go get -u golang.org/x/tools/cmd/stringer; \
|
||||||
fi
|
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
|
@go fmt command/internal_plugin_list.go > /dev/null
|
||||||
|
|
||||||
fmt:
|
fmt:
|
||||||
|
|
Loading…
Reference in New Issue