Rollup merge of #44630 - RalfJung:compiletest, r=Mark-Simulacrum

compiletest: print the correct basename of the src dir

See <https://github.com/laumann/compiletest-rs/issues/76>.

Fixes #40712
This commit is contained in:
Tim Neumann 2017-09-17 13:19:13 +02:00 committed by GitHub
commit 6b1f0c8694
2 changed files with 1 additions and 3 deletions

View File

@ -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())
.join(&testpaths.relative_dir)
.join(&testpaths.file.file_name().unwrap());
test::DynTestName(format!("[{}] {}", config.mode, path.display()))

View File

@ -2174,8 +2174,6 @@ actual:\n\
}
fn run_ui_test(&self) {
println!("ui: {}", self.testpaths.file.display());
let proc_res = self.compile_test();
let expected_stderr_path = self.expected_output_path("stderr");