Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable race checker conditionally in Makefile #3539

Merged
merged 1 commit into from
Oct 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -382,10 +382,6 @@ jobs:
path: |
build/cache/go/mod

- name: Disable race checker
if: matrix.arch == 'arm'
run: echo GO_TEST_RACE= >>"$GITHUB_ENV"

- name: Build
run: |
make bindata
Expand Down
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,11 @@ $(smoketests): k0s
smoketests: $(smoketests)

.PHONY: check-unit
ifneq (, $(filter $(HOST_ARCH), arm))
check-unit: GO_TEST_RACE ?=
else
check-unit: GO_TEST_RACE ?= -race
endif
check-unit: go.sum codegen
$(GO) test -tags=hack $(GO_TEST_RACE) -ldflags='$(LD_FLAGS)' `$(GO) list -tags=hack $(GO_CHECK_UNIT_DIRS)`

Expand Down
Loading