Skip to content

Commit

Permalink
canonicalize path in another place to fix rust-lang#128411
Browse files Browse the repository at this point in the history
  • Loading branch information
EtomicBomb committed Jul 31, 2024
1 parent f91da72 commit bd23e0e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/tools/compiletest/src/runtest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2968,7 +2968,9 @@ impl<'test> TestCx<'test> {
for _ in res.stdout.split('\n').filter(|s| s.starts_with("test ")).inspect(|s| {
if let Some((left, right)) = s.split_once(" - ") {
let path = left.rsplit("test ").next().unwrap();
if let Some(ref mut v) = files.get_mut(&path.replace('\\', "/")) {
let path = fs::canonicalize(&path).expect("failed to canonicalize");
let path = path.to_str().unwrap().replace('\\', "/");
if let Some(ref mut v) = files.get_mut(&path) {
tested += 1;
let mut iter = right.split("(line ");
iter.next();
Expand Down

0 comments on commit bd23e0e

Please sign in to comment.