Skip to content

compiletest: print the correct basename of the src dir #44630

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 2 commits into from
Sep 17, 2017

Conversation

RalfJung
Copy link
Member

@RalfJung RalfJung commented Sep 16, 2017

@rust-highfive
Copy link
Contributor

r? @alexcrichton

(rust_highfive has picked a reviewer for you, use r? to override)

@kennytm
Copy link
Member

kennytm commented Sep 16, 2017

Does this close #40712?

@@ -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());
Copy link
Contributor

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?

Copy link
Member Author

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.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah OK

@RalfJung
Copy link
Member Author

@kennytm Yes I think it does.

@RalfJung RalfJung changed the title compiletest: print the correct basenam of the src dir compiletest: print the correct basename of the src dir Sep 16, 2017
@Mark-Simulacrum
Copy link
Member

@bors r+

@bors
Copy link
Collaborator

bors commented Sep 16, 2017

📌 Commit 83589f2 has been approved by Mark-Simulacrum

TimNN added a commit to TimNN/rust that referenced this pull request Sep 17, 2017
…crum

compiletest: print the correct basename of the src dir

See <Manishearth/compiletest-rs#76>.

Fixes rust-lang#40712
TimNN added a commit to TimNN/rust that referenced this pull request Sep 17, 2017
…crum

compiletest: print the correct basename of the src dir

See <Manishearth/compiletest-rs#76>.

Fixes rust-lang#40712
TimNN added a commit to TimNN/rust that referenced this pull request Sep 17, 2017
…crum

compiletest: print the correct basename of the src dir

See <Manishearth/compiletest-rs#76>.

Fixes rust-lang#40712
bors added a commit that referenced this pull request Sep 17, 2017
Rollup of 17 pull requests

- Successful merges: #44073, #44088, #44381, #44397, #44509, #44533, #44549, #44553, #44562, #44567, #44595, #44604, #44617, #44622, #44630, #44639, #44647
- Failed merges:
@bors bors merged commit 83589f2 into rust-lang:master Sep 17, 2017
@RalfJung RalfJung deleted the compiletest branch July 10, 2018 09:05
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants