Skip to content

Commit bc03751

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

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Makefile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,13 @@ 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" ] || [ "$$OS" = "darwin" ]; then \
85+
echo "Running tests on $$OS"; \
86+
CGO_ENABLED=1 go test -race $(BUILD_TAGS) ./...; \
87+
else \
88+
CGO_ENABLED=0 go test $(BUILD_TAGS) ./...; \
89+
fi
8490

8591
porcelain::
8692
gofmt -w -l $$(find . -name '*.go')

0 commit comments

Comments
 (0)