mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 02:15:43 +03:00
Run test with verbose mode and log to a file
This commit is contained in:
10
GNUmakefile
10
GNUmakefile
@@ -1,3 +1,4 @@
|
||||
SHELL = bash
|
||||
PROJECT_ROOT := $(patsubst %/,%,$(dir $(abspath $(lastword $(MAKEFILE_LIST)))))
|
||||
THIS_OS := $(shell uname)
|
||||
|
||||
@@ -228,10 +229,15 @@ 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
|
||||
@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)
|
||||
|
||||
Reference in New Issue
Block a user