Skip to content

Commit 5b043c4

Browse files
milasndeloof
authored andcommitted
ci: don't use -race on Windows
I misunderstood the cause of the symptom in docker#10261 - thought that we'd explicitly turned off CGO for Windows with some of the build changes recently, but we don't even have `gcc` on the CI node, so it's actually just `-race` entirely that's the trouble. For right now, going the easy route and disabling it. We can look at getting a C toolchain on the Windows machine later. Signed-off-by: Milas Bowman <[email protected]>
1 parent d93da18 commit 5b043c4

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

Makefile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,12 @@ ifeq ($(DETECTED_OS),Windows)
3333
BINARY_EXT=.exe
3434
endif
3535

36-
TEST_COVERAGE_FLAGS = -race -coverprofile=coverage.out -covermode=atomic
36+
TEST_COVERAGE_FLAGS = -coverprofile=coverage.out -covermode=atomic
37+
ifneq ($(DETECTED_OS),Windows)
38+
# go race detector requires gcc on Windows so not used by default
39+
# https://github.com/golang/go/issues/27089
40+
TEST_COVERAGE_FLAGS += -race
41+
endif
3742
TEST_FLAGS?=
3843
E2E_TEST?=
3944
ifeq ($(E2E_TEST),)
@@ -61,7 +66,7 @@ install: binary
6166

6267
.PHONY: e2e-compose
6368
e2e-compose: ## Run end to end local tests in plugin mode. Set E2E_TEST=TestName to run a single test
64-
CGO_ENABLED=1 go test $(TEST_FLAGS) $(TEST_COVERAGE_FLAGS) -count=1 ./pkg/e2e
69+
go test $(TEST_FLAGS) $(TEST_COVERAGE_FLAGS) -count=1 ./pkg/e2e
6570

6671
.PHONY: e2e-compose-standalone
6772
e2e-compose-standalone: ## Run End to end local tests in standalone mode. Set E2E_TEST=TestName to run a single test

0 commit comments

Comments
 (0)