about summary refs log tree commit diff
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2023-01-19 11:19:36 +0100
committerGitHub <noreply@github.com>2023-01-19 11:19:36 +0100
commitd1c879f02eed283edab08f92b3f65b069556bba5 (patch)
treeb7fa805f4bf1c45cdbc531dfd5330d1178d7e79b
parent246daa49ee5968966dec192057a9163b94e90601 (diff)
parentf46f9231a8058bcbfc2c1442f86c072f5bd92ddc (diff)
Rollup merge of #107027 - GuillaumeGomez:rm-extra-removal, r=tmiasko
Remove extra removal from test path

I don't know how to describe it shortly so better show what it's doing instead. Currently, there is one extra "rust/" before the test folder when running tests:

```
failures:

---- [rustdoc] rust/tests/rustdoc/redirect.rs stdout ----
```

This is a bit annoying when copying the test path. This is due to the moving of the `tests` folder one level up, meaning we were trimming too much of the `root_path`.

Now it is again displaying the correct path:

```
failures:

---- [rustdoc] tests/rustdoc/redirect.rs stdout ----
```
-rw-r--r--src/tools/compiletest/src/main.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tools/compiletest/src/main.rs b/src/tools/compiletest/src/main.rs
index 2aea30870ff..3092c656cd7 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),