aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorGreg Steuck <syzkaller@nest.cx>2018-10-28 22:42:42 -0700
committerDmitry Vyukov <dvyukov@google.com>2018-10-29 12:28:37 +0100
commit7df9db2eb2c94fd6324472f2ff0045cbcee9b74e (patch)
tree00a7e8dbe224eee5d0ac3ad884e47c0e36ba9784 /Makefile
parent9ca2afa12c5c4d2ebc564a0b2d555571d7a1c719 (diff)
Conditionally enable test -race when supported on the OS.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile4
1 files changed, 3 insertions, 1 deletions
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/