diff --git a/.travis.yml b/.travis.yml index 5ce671d5c..a532fe36d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -58,4 +58,7 @@ install: - if [[ "$RUN_UI_TESTS" ]]; then . $HOME/.nvm/nvm.sh && cd ui && nvm use && cd .. ; fi script: - - sudo -E "PATH=$PATH" make travis + - sudo -E "PATH=$PATH" GOTESTSUM_JUNITFILE=/tmp/results.xml make travis + +after_script: + - cat /tmp/results.xml diff --git a/GNUmakefile b/GNUmakefile index d59beea24..f09f0fc30 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -8,6 +8,8 @@ GIT_DIRTY := $(if $(shell git status --porcelain),+CHANGES) GO_LDFLAGS := "-X github.com/hashicorp/nomad/version.GitCommit=$(GIT_COMMIT)$(GIT_DIRTY)" GO_TAGS = +GO_TEST_CMD = $(if $(shell which gotestsum),gotestsum --,go test) + default: help ifeq (,$(findstring $(THIS_OS),Darwin Linux FreeBSD)) @@ -153,6 +155,7 @@ deps: ## Install build and development dependencies go get -u github.com/a8m/tree/cmd/tree go get -u github.com/magiconair/vendorfmt/cmd/vendorfmt go get -u github.com/golang/protobuf/protoc-gen-go + go get -u gotest.tools/gotestsum .PHONY: lint-deps lint-deps: ## Install linter dependencies @@ -261,7 +264,7 @@ test: ## Run the Nomad test suite and/or the Nomad UI test suite .PHONY: test-nomad test-nomad: dev ## Run Nomad test suites @echo "==> Running Nomad test suites:" - $(if $(ENABLE_RACE),GORACE="strip_path_prefix=$(GOPATH)/src") go test \ + $(if $(ENABLE_RACE),GORACE="strip_path_prefix=$(GOPATH)/src") $(GO_TEST_CMD) \ $(if $(ENABLE_RACE),-race) $(if $(VERBOSE),-v) \ -cover \ -timeout=15m \