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.
This commit is contained in:
Seebs 2020-04-01 15:25:34 -05:00
parent 44fcbee447
commit c6799bd604

View file

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