Conditionally enable test -race when supported on the OS.

This commit is contained in:
Greg Steuck 2018-10-28 22:42:42 -07:00 committed by Dmitry Vyukov
parent 9ca2afa12c
commit 7df9db2eb2

View File

@ -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/