-
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
compiletest: print the correct basename of the src dir #44630
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
Does this close #40712? |
src/tools/compiletest/src/main.rs
Outdated
@@ -517,7 +517,7 @@ pub fn make_test_name(config: &Config, testpaths: &TestPaths) -> test::TestName | |||
// | |||
// run-pass/foo/bar/baz.rs | |||
let path = | |||
PathBuf::from(config.mode.to_string()) | |||
PathBuf::from(config.src_base.file_name().unwrap()); |
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.
config.src_base
is already a PathBuf
so wouldn't it suffice to just write config.src_base
?
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.
That will print the absolute path to the test. I wanted to make it relative to the current working directory, and this is the crude approximation I ended up with.
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.
Ah OK
@kennytm Yes I think it does. |
c4e47ef
to
83589f2
Compare
@bors r+ |
📌 Commit 83589f2 has been approved by |
…crum compiletest: print the correct basename of the src dir See <Manishearth/compiletest-rs#76>. Fixes rust-lang#40712
…crum compiletest: print the correct basename of the src dir See <Manishearth/compiletest-rs#76>. Fixes rust-lang#40712
…crum compiletest: print the correct basename of the src dir See <Manishearth/compiletest-rs#76>. Fixes rust-lang#40712
See Manishearth/compiletest-rs#76.
Fixes #40712