Update makefile to tee test logs to a file so it's easier to review them after the run complete

This commit is contained in:
Chris Bednarski 2015-10-14 16:32:21 -07:00
parent 31f5721863
commit b6bf2f899e
1 changed files with 3 additions and 3 deletions

View File

@ -37,7 +37,7 @@ generate: deps
go generate ./...
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 get golang.org/x/tools/cmd/vet; \
fi
@ -49,10 +49,10 @@ test: deps
# testacc runs acceptance tests
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."
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
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
# kinds of headaches. We record the git sha when make starts try to correct it