Skip to content

Commit b7eeb3c

Browse files
committed
Make $SRC_DIR_REAL normalisation more robust
1 parent ff5934f commit b7eeb3c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/tools/compiletest/src/runtest.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -4222,7 +4222,9 @@ impl<'test> TestCx<'test> {
42224222
normalize_path(parent_build_dir, "$BUILD_DIR");
42234223

42244224
// Real paths into the libstd/libcore
4225-
normalize_path(&parent_build_dir.parent().unwrap().join("library"), "$SRC_DIR_REAL");
4225+
let rust_src_dir =
4226+
&self.config.sysroot_base.join("lib/rustlib/src/rust").canonicalize().unwrap();
4227+
normalize_path(&rust_src_dir.join("library"), "$SRC_DIR_REAL");
42264228

42274229
if json {
42284230
// escaped newlines in json strings should be readable

0 commit comments

Comments
 (0)