Skip to content

Commit

Permalink
Remove usage of -race flag in tests for 32 bit architectures because …
Browse files Browse the repository at this point in the history
…it's not supported there
  • Loading branch information
nkryuchkov committed Mar 4, 2020
1 parent f791660 commit 80dd47d
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,25 @@ DOCKER_NETWORK?=SKYNET
DOCKER_NODE?=SKY01
DOCKER_OPTS?=GO111MODULE=on GOOS=linux # go options for compiling for docker container

GO_VERSION=$(shell go version)
TEST_OPTS_BASE:=-cover -timeout=1m

RACE_FLAG:=-race
GOARCH:=$(shell go env GOARCH)

ifneq (,$(findstring 64,$(GOARCH)))
TEST_OPTS_BASE:=$(TEST_OPTS_BASE) $(RACE_FLAG)
endif

# TODO: Remove after https://github.com/etcd-io/bbolt/pull/201 is closed.
DISABLE_CHECKPTR=-gcflags=all=-d=checkptr=0
OPTIONAL_FLAGS=
GO_VERSION:=$(shell go version)
DISABLE_CHECKPTR_FLAG:=-gcflags=all=-d=checkptr=0

ifneq (,$(findstring go1.14,$(GO_VERSION)))
OPTIONAL_FLAGS=$(DISABLE_CHECKPTR)
TEST_OPTS_BASE:=$(TEST_OPTS_BASE) $(DISABLE_CHECKPTR_FLAG)
endif

TEST_OPTS?=-race $(OPTIONAL_FLAGS) -tags no_ci -cover -timeout=5m
TEST_OPTS_NOCI?=-race $(OPTIONAL_FLAGS) -cover -timeout=5m -v
TEST_OPTS_NOCI:=-$(TEST_OPTS_BASE) -v
TEST_OPTS:=$(TEST_OPTS_BASE) -tags no_ci

BUILDINFO_PATH := $(PROJECT_BASE)/pkg/util/buildinfo

Expand Down

0 comments on commit 80dd47d

Please sign in to comment.