Skip to content

Commit

Permalink
Set the -race flag for go tests
Browse files Browse the repository at this point in the history
  • Loading branch information
iwahbe committed Mar 28, 2024
1 parent 6d6b8aa commit 9a69c1f
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
.PHONY: build build_examples install_examples lint lint-copyright lint-golang

GO_TEST_FLAGS=-race
GO_TEST=go test ${GO_TEST_FLAGS}

build:
go build ./...

Expand All @@ -8,13 +11,13 @@ test: test_unit test_examples

.PHONY: test_unit
test_unit: build
go test ./...
cd infer/tests && go test ./...
cd integration && go test ./...
cd resourcex && go test ./...
cd tests && go test ./...
${GO_TEST} ./...
cd infer/tests && ${GO_TEST} ./...
cd integration && ${GO_TEST} ./...
cd resourcex && ${GO_TEST} ./...
cd tests && ${GO_TEST} ./...
for d in examples/*; do if [ -d $$d ]; then \
cd $$d; go test ./... || exit $$?; \
cd $$d; ${GO_TEST} ./... || exit $$?; \
cd -; fi; done

lint: lint-golang lint-copyright
Expand Down

0 comments on commit 9a69c1f

Please sign in to comment.