-
Notifications
You must be signed in to change notification settings - Fork 13.3k
rustbuild: Use Cargo's "target runner" #43534
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
Conversation
r? @aturon (rust_highfive has picked a reviewer for you, use r? to override) |
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.
Happy to see code being moved into cargo.
src/libstd/process.rs
Outdated
@@ -1418,7 +1418,8 @@ mod tests { | |||
|
|||
for (ref k, ref v) in env::vars() { | |||
// don't check android RANDOM variables | |||
if cfg!(target_os = "android") && *k == "RANDOM" { | |||
if cfg!(target_os = "android") && | |||
(*k == "RANDOM" || k.contains("-")) { |
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.
This feels like it's including lots of environment variables from android systems, no? I'd definitely want a comment here..
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.
Oh oops right forgot to mention this, I'll add a comment.
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.
FWIW environment variables with -
is pretty rare (most have _
) and I'm just sort of randomly chalking this up to a bug in the set
command which we're using to learn about environment variables.
This commit leverages a relatively new feature in Cargo to execute cross-compiled tests, the `target.$target.runner` configuration. We configure it through environment variables in rustbuild and this avoids the need for us to locate and run tests after-the-fact, instead relying on Cargo to do all that execution for us.
Updated! |
5529a72
to
8e7849e
Compare
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.
Totally missed that the changes to android where in a test. I think it's much clearer with the comment, though. Thanks!
@bors r+ |
📌 Commit 8e7849e has been approved by |
…acrum rustbuild: Use Cargo's "target runner" This commit leverages a relatively new feature in Cargo to execute cross-compiled tests, the `target.$target.runner` configuration. We configure it through environment variables in rustbuild and this avoids the need for us to locate and run tests after-the-fact, instead relying on Cargo to do all that execution for us.
☀️ Test successful - status-appveyor, status-travis |
This commit leverages a relatively new feature in Cargo to execute
cross-compiled tests, the
target.$target.runner
configuration. We configure itthrough environment variables in rustbuild and this avoids the need for us to
locate and run tests after-the-fact, instead relying on Cargo to do all that
execution for us.