Skip to content

Commit

Permalink
Merge pull request #4620 from hashicorp/f-optional-race
Browse files Browse the repository at this point in the history
Add a -race enabled build to Travis
  • Loading branch information
schmichael authored Aug 31, 2018
2 parents 661502b + ec1d3e1 commit 95855f0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
7 changes: 7 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ matrix:
- os: linux
dist: trusty
sudo: required
- os: linux
dist: trusty
sudo: required
env: ENABLE_RACE=1
- os: linux
dist: trusty
sudo: false
Expand All @@ -28,7 +32,10 @@ matrix:
- os: osx
osx_image: xcode9.1
allow_failures:
# Allow osx to fail as its flaky
- os: osx
#FIXME Allow race enabled builds to fail for now.
- env: ENABLE_RACE=1
fast_finish: true

before_install:
Expand Down
9 changes: 5 additions & 4 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -244,10 +244,11 @@ 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:"
@go test $(if $(VERBOSE),-v) \
-cover \
-timeout=900s \
-tags="$(if $(HAS_LXC),lxc)" ./... $(if $(VERBOSE), >test.log ; echo $$? > exit-code)
$(if $(ENABLE_RACE),GORACE="strip_path_prefix=$(GOPATH)/src") go test \
$(if $(ENABLE_RACE),-race) $(if $(VERBOSE),-v) \
-cover \
-timeout=900s \
-tags="$(if $(HAS_LXC),lxc)" ./... $(if $(VERBOSE), >test.log ; echo $$? > exit-code)
@if [ $(VERBOSE) ] ; then \
bash -C "$(PROJECT_ROOT)/scripts/test_check.sh" ; \
fi
Expand Down

0 comments on commit 95855f0

Please # to comment.