Skip to content

Commit

Permalink
Fix tests for Go versions older than 1.14
Browse files Browse the repository at this point in the history
  • Loading branch information
nkryuchkov committed Mar 3, 2020
1 parent 30a16fd commit a946dfe
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,16 @@ DOCKER_IMAGE?=skywire-runner # docker image to use for running skywire-visor.`go
DOCKER_NETWORK?=SKYNET
DOCKER_NODE?=SKY01
DOCKER_OPTS?=GO111MODULE=on GOOS=linux # go options for compiling for docker container
TEST_OPTS?=-race -gcflags=all=-d=checkptr=0 -tags no_ci -cover -timeout=5m
TEST_OPTS_NOCI?=-race -gcflags=all=-d=checkptr=0 -cover -timeout=5m -v

GO_VERSION=$(shell go version)
DISABLE_CHECKPTR=-gcflags=all=-d=checkptr=0
OPTIONAL_FLAGS=
ifneq (,$(findstring go1.14,$(GO_VERSION)))
OPTIONAL_FLAGS=$(DISABLE_CHECKPTR)
endif

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

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

Expand Down

0 comments on commit a946dfe

Please sign in to comment.