From 7df9db2eb2c94fd6324472f2ff0045cbcee9b74e Mon Sep 17 00:00:00 2001 From: Greg Steuck Date: Sun, 28 Oct 2018 22:42:42 -0700 Subject: Conditionally enable test -race when supported on the OS. --- Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index ac35334a7..18e777b9e 100644 --- a/Makefile +++ b/Makefile @@ -289,7 +289,9 @@ test: env CGO_ENABLED=1 $(GO) test -short ./... test_race: - env CGO_ENABLED=1 $(GO) test -short -race -bench=.* -benchtime=.2s ./... + $(GO) test -race; if test $$? -ne 2; then \ + env CGO_ENABLED=1 $(GO) test -short -race -bench=.* -benchtime=.2s ./... ;\ + fi clean: rm -rf ./bin/ -- cgit mrf-deployment