Merge pull request #3477 from hashicorp/verbose_test
Run test with verbose mode and log to a file
This commit is contained in:
commit
f72b705240
11
GNUmakefile
11
GNUmakefile
|
@ -1,3 +1,4 @@
|
|||
SHELL = bash
|
||||
PROJECT_ROOT := $(patsubst %/,%,$(dir $(abspath $(lastword $(MAKEFILE_LIST)))))
|
||||
THIS_OS := $(shell uname)
|
||||
|
||||
|
@ -228,10 +229,16 @@ test-nomad: dev ## Run Nomad test suites
|
|||
@echo "==> Running Nomad test suites:"
|
||||
@NOMAD_TEST_RKT=1 \
|
||||
go test \
|
||||
-v \
|
||||
-cover \
|
||||
-timeout=900s \
|
||||
-tags="nomad_test $(if $(HAS_LXC),lxc)" \
|
||||
./...
|
||||
-tags="nomad_test $(if $(HAS_LXC),lxc)" ./... >test.log ; echo $$? > exit-code
|
||||
@echo "Exit code: $$(cat exit-code)" >> test.log
|
||||
@grep -A1 -- '--- FAIL:' test.log || true
|
||||
@grep '^FAIL' test.log || true
|
||||
@grep -A10 'panic' test.log || true
|
||||
@test "$$TRAVIS" == "true" && cat test.log || true
|
||||
@if [ "$$(cat exit-code)" == "0" ] ; then echo "PASS" ; exit 0 ; else exit 1 ; fi
|
||||
|
||||
.PHONY: clean
|
||||
clean: GOPATH=$(shell go env GOPATH)
|
||||
|
|
Loading…
Reference in New Issue