From b59cfff419bb12951a44c672b3462f59c7e0026b Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 17 Sep 2017 14:05:38 -0400 Subject: Makefile: "-race" doesn't work in i686, don't break the tests there --- Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index f436ca6..873d745 100644 --- a/Makefile +++ b/Makefile @@ -90,8 +90,11 @@ $(outdir)/go/src/nshd/nshd_files/paths.go: $(var.)bindir $(var.)conf_file $(var. $(outdir)/go/bin/nshd: $(outdir)/$(files.generate) $(outdir)/go/src/nshd/nshd_files/paths.go files.out.all += $(outdir)/go/src/nshd/nshd_files/paths.go +go_os_arch = $(word 4,$(shell go version)) +go_race_os_arch = $(shell go help build | sed -n '/^\s*-race/,/^\s*-/p'| grep -oE '[a-z0-9]+/[a-z0-9]+') +go_test_flags = $(if $(filter $(go_os_arch),$(go_race_os_arch)),-race) $(outdir)/check: - GOPATH=$$PWD/go go test -race $$(GOPATH=$$PWD/go go list -f '{{.ImportPath}}{{"\n"}}{{join .Deps "\n"}}' $(bins_go) | sort -u | grep -e ^nshd -e '\.[^/]*/') + GOPATH=$$PWD/go go test $(go_test_flags) $$(GOPATH=$$PWD/go go list -f '{{.ImportPath}}{{"\n"}}{{join .Deps "\n"}}' $(bins_go) | sort -u | grep -e ^nshd -e '\.[^/]*/') .PHONY: $(outdir)/check at.targets += $(outdir)/check -- cgit v1.2.2