Skip to content

Propagate --test-args for x.py test src/tools/cargo #82622

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 1 commit into from
Mar 1, 2021

Conversation

jyn514
Copy link
Member

@jyn514 jyn514 commented Feb 28, 2021

Fixes #82621.

@jyn514 jyn514 added A-testsuite Area: The testsuite used to check the correctness of rustc T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Feb 28, 2021
@rust-highfive
Copy link
Contributor

r? @Mark-Simulacrum

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 28, 2021
@jyn514
Copy link
Member Author

jyn514 commented Feb 28, 2021

I tested this locally and it works correctly:

$ x.py test src/tools/cargo --test-args message_format

     Running build/x86_64-unknown-linux-gnu/stage0-tools/x86_64-unknown-linux-gnu/release/deps/testsuite-31350880843d905f

running 11 tests
test build::wrong_message_format_option ... ok
test locate_project::message_format ... ok
test message_format::cannot_specify_two ... ok
test message_format::cargo_renders_ansi ... ok
test message_format::cargo_renders_short ... ok
test check::short_message_format ... ok
test message_format::cargo_renders ... ok
test build::message_format_json_forward_stderr ... ok
test message_format::double_json_works ... ok
test doc::doc_message_format ... ok
test doc::short_message_format ... ok

test result: ok. 11 passed; 0 failed; 0 ignored; 0 measured; 2108 filtered out; finished in 1.34s

@Mark-Simulacrum
Copy link
Member

Seems OK to me. I'm a bit worried that this means if you're purely running x.py test the test args are getting passed to libtest for cargo and weren't before, so e.g. a UI and cargo test run might be able to work before but now wouldn't. But breaking that seems fine to me.

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Mar 1, 2021

📌 Commit 05140ec has been approved by Mark-Simulacrum

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 1, 2021
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 1, 2021
Rollup of 10 pull requests

Successful merges:

 - rust-lang#82309 (Propagate RUSTDOCFLAGS in the environment when documenting)
 - rust-lang#82403 (rustbuild: print out env vars on verbose rustc invocations)
 - rust-lang#82507 (Rename the `tidy` binary to `rust-tidy`)
 - rust-lang#82531 (Add GUI tests)
 - rust-lang#82532 (Add `build.print_step_rusage` to config.toml)
 - rust-lang#82543 (fix env var name in CI)
 - rust-lang#82622 (Propagate `--test-args` for `x.py test src/tools/cargo`)
 - rust-lang#82628 (Try to clarify GlobalAlloc::realloc documentation comment.)
 - rust-lang#82630 (Fix a typo in the `find_anon_type` doc)
 - rust-lang#82643 (Add more proc-macro attribute tests)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit d65b231 into rust-lang:master Mar 1, 2021
@rustbot rustbot added this to the 1.52.0 milestone Mar 1, 2021
@jyn514 jyn514 deleted the cargo-test-args branch March 1, 2021 14:11
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

x.py test src/tools/cargo --test-args x does not pass x as an argument
5 participants