rust-lang / rust-lang/rust

Compiletest path normalization fails in windows if path is inside a string

Open
#132,752 3 comments 0 reactions 1 assignee View on GitHub

@jieyouxu is already working on this.

Since Dec 10, 2024.

A-compiletest A-testsuite C-bug O-windows S-needs-repro T-bootstrap
Dominant language
Rust
Stars
119k
Forks
16.2k
PR merge metrics
PR metrics pending

Description

In the initial version of https://github.com/rust-lang/rust/pull/132161, a Windows CI job because the stdout contained a string containing the test path that wasn't normalized.

I'm pasting the error as described in https://github.com/rust-lang/rust/pull/132161#issuecomment-2442931343:

---- [ui] tests\ui\stable-mir-print\operands.rs stdout ----
$DIR\operands.rs
$DIR\operands.rs
\a\rust\rust\tests\ui\stable-mir-print\operands.rs
$DIR\operands.rs
Saved the actual stdout to "C:\\a\\rust\\rust\\build\\x86_64-pc-windows-msvc\\test\\ui\\stable-mir-print\\operands\\operands.stdout"


226     debug x => _1;
227     debug z => _2;
228     bb0: {
-         _0 = {closure@Span { id: 105, repr: "$DIR/operands.rs:44:5: 44:19" }}(_1, _2);
+         _0 = {closure@Span { id: 105, repr: "C:/a/rust/rust/tests/ui/stable-mir-print/operands.rs:44:5: 44:19" }}(_1, _2);
231     }
232 }

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.