-
Notifications
You must be signed in to change notification settings - Fork 762
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
Makefile: only use race detection when it's available #3518
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: nalind The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
LGTM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Stdout spits logs for downloading go.mods
maybe redirect stdout to /dev/null
and error to /stdout
Edit: its line no 13 of Makefile.
Ah, right, the order matters. Swapped them. |
LGTM |
Taking the |
And likewise, |
What about the copy command? |
I'm currently hoping it doesn't slow the integration tests down enough to cause CI jobs to time out, but we'll see. |
Check if `go test` supports the -race flag on the build platform, and if so, use it for unit tests instead of just assuming that it's always available. Use sync/atomic to safely use a uint32 instead of a bool to keep track of whether or not the process we started for RUN has stopped. [NO NEW TESTS NEEDED] Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
Switched to using |
/lgtm |
LGTM |
/hold cancel |
What type of PR is this?
/kind other
What this PR does / why we need it:
Check if
go test
supports the-race
flag on the build platform, and if so, and only use it for unit tests if it's supported.Fix a race in
run_linux.go
.How to verify it
make test-unit
should work correctly on platforms where the-race
flag is not supported for builds.go help build
will list which platforms your installed version of Go supports the flag for.Which issue(s) this PR fixes:
None
Special notes for your reviewer:
Marking this as not needing new tests, though it may end up requiring additional changes if the tests we already have start noticing things that need to be fixed.
Does this PR introduce a user-facing change?