Skip to content

Commit 6b5fd03

Browse files
committed
chore: run tests with race checks only on linux & darwin
1 parent 359643f commit 6b5fd03

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Makefile

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,14 @@ test-ui::
8080

8181
test::
8282
@echo "Running testsuite"
83-
CGO_ENABLED=0 go test $(BUILD_TAGS) ./...
83+
@OS=$$(go env GOOS); \
84+
if [ "$$OS" = "linux" ]; then \
85+
CGO_ENABLED=1 go test -race $(BUILD_TAGS) ./...; \
86+
elif [ "$$OS" = "darwin" ]; then \
87+
CGO_ENABLED=0 go test -race $(BUILD_TAGS) ./...; \
88+
else \
89+
CGO_ENABLED=0 go test $(BUILD_TAGS) ./...; \
90+
fi
8491

8592
porcelain::
8693
gofmt -w -l $$(find . -name '*.go')

0 commit comments

Comments
 (0)