Ensure rustc-echo-wrapper works with an overridden build.target-dir#10962
Merged
bors merged 1 commit intorust-lang:masterfrom Aug 10, 2022
Merged
Ensure rustc-echo-wrapper works with an overridden build.target-dir#10962bors merged 1 commit intorust-lang:masterfrom
bors merged 1 commit intorust-lang:masterfrom
Conversation
|
r? @ehuss (rust-highfive has picked a reviewer for you, use r? to override) |
Contributor
|
Thanks! I think the issue here is that the sandbox limits aren't getting set correctly. I think something like this would be a more correct fix: diff --git a/crates/cargo-test-support/src/lib.rs b/crates/cargo-test-support/src/lib.rs
index 1ed9bd54e..ed9e50f33 100644
--- a/crates/cargo-test-support/src/lib.rs
+++ b/crates/cargo-test-support/src/lib.rs
@@ -1209,7 +1209,7 @@ pub trait TestEnv: Sized {
.current_dir(&paths::root())
.env("HOME", paths::home())
.env("CARGO_HOME", paths::home().join(".cargo"))
- .env("__CARGO_TEST_ROOT", paths::root())
+ .env("__CARGO_TEST_ROOT", paths::global_root())
// Force Cargo to think it's on the stable channel for all tests, this
// should hopefully not surprise us as we add cargo features over time and
// cargo rides the trains.That will ensure that things like echo-wrapper don't read any configuration settings from above the |
b7a9ce8 to
61c4b11
Compare
Contributor
Author
|
Yep, that seems to work and makes a lot more sense. |
Contributor
|
Thanks! @bors r+ |
Contributor
Contributor
Contributor
|
☀️ Test successful - checks-actions |
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Aug 12, 2022
Update cargo 8 commits in ce40690a5e4e315d3dab0aae1eae69d0252c52ac..efd4ca3dc0b89929dc8c5f5c023d25978d76cb61 2022-08-09 22:32:17 +0000 to 2022-08-12 01:28:28 +0000 - Use `std::thread::scope` to replace crossbeam (rust-lang/cargo#10977) - [docs] Remove extra "in" from `cargo-test.md` (rust-lang/cargo#10978) - Enable two windows tests (rust-lang/cargo#10930) - Improve error msg for get target runner (rust-lang/cargo#10968) - Ensure rustc-echo-wrapper works with an overridden build.target-dir (rust-lang/cargo#10962) - Switch back to `available_parallelism` (rust-lang/cargo#10969) - Only override published resolver when the workspace is different (rust-lang/cargo#10961) - Add `CARGO_LOG` to "Environment variables Cargo reads" (rust-lang/cargo#10967)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Without this when running with an overridden target-dir there are about a dozen test failures like
Because the
rustc-echo-wrapperis compiled tonot-target/debug/rustc-echo-wrapper.This is resolved by forcing the target-dir to be a manifest-relative one for this specific build.