]> git.lizzy.rs Git - rust.git/commitdiff
compiletest: print the correct basename of the src dir
authorRalf Jung <post@ralfj.de>
Sat, 16 Sep 2017 11:02:31 +0000 (13:02 +0200)
committerRalf Jung <post@ralfj.de>
Sat, 16 Sep 2017 11:12:53 +0000 (13:12 +0200)
src/tools/compiletest/src/main.rs

index 15216f52d91fd1bdfda89a9691472f6298454cac..26c447d01d364d2a66d742158a34444f163953e0 100644 (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()))