-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Make x test tests
work
#121372
Make x test tests
work
#121372
Conversation
r? @onur-ozkan rustbot has assigned @onur-ozkan. Use r? to explicitly pick a reviewer |
This comment was marked as outdated.
This comment was marked as outdated.
Whoops, left over commit from something else |
79aeea2
to
1081c15
Compare
I was about to ask why 😂 |
This comment has been minimized.
This comment has been minimized.
1081c15
to
602bb51
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.
I think we can make this work without adding a fake build step by improving the path remapping in builder.rs:
rust/src/bootstrap/src/core/builder.rs
Lines 291 to 301 in 0987e41
const PATH_REMAP: &[(&str, &str)] = &[("rust-analyzer-proc-macro-srv", "proc-macro-srv-cli")]; | |
fn remap_paths(paths: &mut Vec<&Path>) { | |
for path in paths.iter_mut() { | |
for &(search, replace) in PATH_REMAP { | |
if path.to_str() == Some(search) { | |
*path = Path::new(replace) | |
} | |
} | |
} | |
} |
602bb51
to
8609452
Compare
if path.to_str() == Some(search) { | ||
*path = Path::new(replace) | ||
// Remove leading and trailing slashes so `tests/` and `tests` are equivalent | ||
if path.trim_matches(std::path::is_separator) == search { |
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.
Different shells can tab-complete a folder name with or without a trailing slash so hopefully this can handle both
☔ The latest upstream changes (presumably #121400) made this pull request unmergeable. Please resolve the merge conflicts. |
8609452
to
eee5672
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.
Thanks!
@bors r+ |
"tests", | ||
&[ | ||
"tests/assembly", | ||
"tests/codegen", |
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.
Nothing can go wrong with hardcoded paths.
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.
Maybe collects folders in /tests at runtime and assert that lists equal (excluding auxiliary
)?
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.
I'll follow this one up with a test
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.
And now this list missing tests/crashes
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.
We have a test for checking the existance paths. Seems like we need a test for missing paths too.
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.
We have a test for checking the existance paths. Seems like we need a test for missing paths too.
Here it is: #124969
☀️ Test successful - checks-actions |
Finished benchmarking commit (933a05b): comparison URL. Overall result: ✅ improvements - no action needed@rustbot label: -perf-regression Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 649.076s -> 649.98s (0.14%) |
Fixes #97314
This makes
x test tests
work, and be roughly equivalent tox test tests/*
. The--dry-run
output is identical, except for errors on the non-test items intests
and a couple of things being in a different order (where path != struct name).This probably needs a test, but I'm not sure of the best way to do it.