From 55900d0f52ad0240ffeec86a03d77b93fd32e8cf Mon Sep 17 00:00:00 2001 From: bjorn3 <17426603+bjorn3@users.noreply.github.com> Date: Wed, 18 Jan 2023 18:16:17 +0000 Subject: [PATCH] Fix test names generated by compiletest This is fallout from moving tests from src/test/ to tests/. Before this commit compiletest would give a test at tests/ui/foo.rs if your rust checkout is called my_rust_checkout the name my_rust_checkout/tests/ui/foo.rs rather than the proper tests/ui/foo.rs --- src/tools/compiletest/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/compiletest/src/main.rs b/src/tools/compiletest/src/main.rs index 2aea30870ff5e..3092c656cd729 100644 --- a/src/tools/compiletest/src/main.rs +++ b/src/tools/compiletest/src/main.rs @@ -775,7 +775,7 @@ fn make_test_name( ) -> test::TestName { // Print the name of the file, relative to the repository root. // `src_base` looks like `/path/to/rust/tests/ui` - let root_directory = config.src_base.parent().unwrap().parent().unwrap().parent().unwrap(); + let root_directory = config.src_base.parent().unwrap().parent().unwrap(); let path = testpaths.file.strip_prefix(root_directory).unwrap(); let debugger = match config.debugger { Some(d) => format!("-{}", d),