Skip to content

Commit

Permalink
ignore nested pkgs in GOTEST_PKGS_EXCLUDE
Browse files Browse the repository at this point in the history
This fixes a bug where some packages tests run twice in CI, because they
are subpackages of ones with dedicated jobs.  For example, notice
`client/allocrunner` tests ran in `test-client`[1] and `test-other`[2] despite
them being in the same workflow[3].

[1] https://circleci.com/gh/hashicorp/nomad/5262
[2] https://circleci.com/gh/hashicorp/nomad/5261
[3] https://circleci.com/workflow-run/ee7a9167-8fc7-49a5-897c-6c967e966014
  • Loading branch information
Mahmood Ali committed Sep 3, 2019
1 parent 482862e commit 515935d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ GO_TEST_CMD = $(if $(shell which gotestsum),gotestsum --,go test)
ifeq ($(origin GOTEST_PKGS_EXCLUDE), undefined)
GOTEST_PKGS ?= "./..."
else
GOTEST_PKGS=$(shell go list ./... | sed 's/github.com\/hashicorp\/nomad/./' | egrep -v "^($(GOTEST_PKGS_EXCLUDE))$$")
GOTEST_PKGS=$(shell go list ./... | sed 's/github.com\/hashicorp\/nomad/./' | egrep -v "^($(GOTEST_PKGS_EXCLUDE))(/.*)?$$")
endif

default: help
Expand Down

0 comments on commit 515935d

Please sign in to comment.