Merge pull request #2833 from mitchellh/test-logs

Log results of make test* to a file for easier review
This commit is contained in:
Mark Peek 2015-10-15 11:20:48 -07:00
commit 740de792e0
2 changed files with 5 additions and 3 deletions

2
.gitignore vendored
View File

@ -10,3 +10,5 @@ test/.env
website/.bundle website/.bundle
website/vendor website/vendor
packer-test*.log

View File

@ -37,7 +37,7 @@ generate: deps
go generate ./... go generate ./...
test: deps test: deps
go test $(TEST) $(TESTARGS) -timeout=15s go test $(TEST) $(TESTARGS) -timeout=15s | tee packer-test.log
@go vet 2>/dev/null ; if [ $$? -eq 3 ]; then \ @go vet 2>/dev/null ; if [ $$? -eq 3 ]; then \
go get golang.org/x/tools/cmd/vet; \ go get golang.org/x/tools/cmd/vet; \
fi fi
@ -49,10 +49,10 @@ test: deps
# testacc runs acceptance tests # testacc runs acceptance tests
testacc: deps generate testacc: deps generate
@echo "WARN: Acceptance tests will take a long time to run and may cost money. Ctrl-C if you want to cancel." @echo "WARN: Acceptance tests will take a long time to run and may cost money. Ctrl-C if you want to cancel."
PACKER_ACC=1 go test -v $(TEST) $(TESTARGS) -timeout=45m PACKER_ACC=1 go test -v $(TEST) $(TESTARGS) -timeout=45m | tee packer-test-acc.log
testrace: deps testrace: deps
go test -race $(TEST) $(TESTARGS) -timeout=15s go test -race $(TEST) $(TESTARGS) -timeout=15s | tee packer-test-race.log
# `go get -u` causes git to revert packer to the master branch. This causes all # `go get -u` causes git to revert packer to the master branch. This causes all
# kinds of headaches. We record the git sha when make starts try to correct it # kinds of headaches. We record the git sha when make starts try to correct it