Skip to content

chore(Makefile): add test-race target #8357

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

Merged
merged 2 commits into from
Jul 7, 2023
Merged

chore(Makefile): add test-race target #8357

merged 2 commits into from
Jul 7, 2023

Conversation

johnstcn
Copy link
Member

@johnstcn johnstcn commented Jul 7, 2023

Adds a Makefile target to run tests with the race detector enabled.

@johnstcn johnstcn self-assigned this Jul 7, 2023
@johnstcn johnstcn requested review from mafredri and mtojek July 7, 2023 10:02
@@ -668,6 +668,11 @@ test-postgres-docker:
done
.PHONY: test-postgres-docker

# Make sure to keep this in sync with test-go-race from .github/workflows/ci.yaml.
test-race: test-clean
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we wipe the test cache when we run via Makefile? Adding -count=1 should work the same and wouldn't trash the cache (e.g. for non-race tests).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we update existing invocations to use -count=1 as well?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, I'll make a separate PR for that and we can debate in there.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good suggestion, I think that would be preferable 👍🏻

Copy link
Member

@mtojek mtojek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@johnstcn johnstcn enabled auto-merge (squash) July 7, 2023 10:13
@johnstcn johnstcn merged commit 2594530 into main Jul 7, 2023
@johnstcn johnstcn deleted the cj/make-test-race branch July 7, 2023 10:15
@github-actions github-actions bot locked and limited conversation to collaborators Jul 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants