From c6799bd604a319a1949ace8c6b4992208b2079be Mon Sep 17 00:00:00 2001 From: Seebs Date: Wed, 1 Apr 2020 15:25:34 -0500 Subject: [PATCH] disable checkptr with go 1.14 The checkptr feature is actually probably right about a few things in roaring and boltdb, but we can ignore them for now, and that prevents checking for races, so we disable that temporarily. Also supply NOCHECKPTR in non-race tests because CI uses "make test" with -race in $TESTFLAGS and we might do that on other occasions. --- Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index f9b6a2100..e0b639060 100644 --- a/Makefile +++ b/Makefile @@ -40,11 +40,13 @@ vendor: go.mod # Run test suite test: - go test ./... -tags='$(BUILD_TAGS)' $(TESTFLAGS) + case $$(go version) in *go1.14*) NOCHECKPTR="-gcflags=all=-d=checkptr=0";; *) NOCHECKPTR="";; esac ; \ + go test ./... -tags='$(BUILD_TAGS)' $(TESTFLAGS) $$NOCHECKPTR # Run test suite with race flag test-race: - go test ./... -tags='$(BUILD_TAGS)' $(TESTFLAGS) -race -timeout 30m + case $$(go version) in *go1.14*) NOCHECKPTR="-gcflags=all=-d=checkptr=0";; *) NOCHECKPTR="";; esac ; \ + go test ./... -tags='$(BUILD_TAGS)' $(TESTFLAGS) -race $$NOCHECKPTR -timeout 30m bench: go test ./... -bench=. -run=NoneZ -timeout=127m $(TESTFLAGS)