Skip to content

Commit 4ed0383

Browse files
committedJul 11, 2020
fix(build): don't set -race when testing on s390x
the race flag is not supported on linux/s390x
1 parent bcf85b7 commit 4ed0383

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed
 

‎Makefile

+7-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ GIT_COMMIT := $(shell git rev-parse --short HEAD)
77
OPM_VERSION := $(shell cat OPM_VERSION)
88
BUILD_DATE := $(shell date -u +'%Y-%m-%dT%H:%M:%SZ')
99
TAGS := -tags "json1"
10+
# -race is only supported on linux/amd64, linux/ppc64le, linux/arm64, freebsd/amd64, netbsd/amd64, darwin/amd64 and windows/amd64
11+
ifeq ($(GOARCH),s390x)
12+
TEST_RACE :=
13+
else
14+
TEST_RACE := -race
15+
endif
1016

1117

1218
.PHONY: all
@@ -28,7 +34,7 @@ static: build
2834

2935
.PHONY: unit
3036
unit:
31-
$(GO) test $(SPECIFIC_UNIT_TEST) $(TAGS) -count=1 -v -race ./pkg/...
37+
$(GO) test $(SPECIFIC_UNIT_TEST) $(TAGS) $(TEST_RACE) -count=1 -v ./pkg/...
3238

3339
.PHONY: image
3440
image:

0 commit comments

Comments
 (0)
Please sign in to comment.