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

Fix Makefile race conditions. #520

Merged
merged 1 commit into from
Nov 10, 2023
Merged

Fix Makefile race conditions. #520

merged 1 commit into from
Nov 10, 2023

Conversation

jrvanwhy
Copy link
Collaborator

This PR fixes two race conditions in libtock-rs' Makefile:

  1. Running e.g. make -j2 hail flash-hail EXAMPLE=console will cause concurrent cargo run invocations that race (another variant of #366). This was fixed by changing the target directories for the flash-* targets.
  2. Running make -j2 test with a missing toolchain can result in parallel toolchain installs, which corrupts the toolchain.

I also fixed make clean, which wasn't cleaning up the nightly toolchain's target directory.

This PR fixes two race conditions in `libtock-rs`' Makefile:
1. Running e.g. `make -j2 hail flash-hail EXAMPLE=console` will cause concurrent `cargo run` invocations that race.
2. Running `make -j2 test` with a missing toolchain can result in parallel toolchain installs, which corrupts the toolchain.

I also fixed `make clean`, which wasn't cleaning up the nightly toolchain's target file.
@jrvanwhy jrvanwhy added the upkeep Indicates a PR is upkeep as defined by the code review policy. label Oct 31, 2023
@jrvanwhy jrvanwhy added this pull request to the merge queue Nov 10, 2023
Merged via the queue into tock:master with commit d46a146 Nov 10, 2023
3 checks passed
@jrvanwhy jrvanwhy deleted the fix-races branch November 10, 2023 20:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
upkeep Indicates a PR is upkeep as defined by the code review policy.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants