]> git.proxmox.com Git - rustc.git/blobdiff - vendor/compiletest_rs/src/runtest.rs
New upstream version 1.58.1+dfsg1
[rustc.git] / vendor / compiletest_rs / src / runtest.rs
index 52364a5f7d5c132dd3d257915f58034b457bb31a..c52551488fd57a226e35c3c2a5b53a95d03554b9 100644 (file)
@@ -2616,6 +2616,11 @@ actual:\n\
         let parent_dir = self.testpaths.file.parent().unwrap();
         normalize_path(parent_dir, "$DIR");
 
+        if let Ok(src_dir_str) = std::env::var("CARGO_MANIFEST_DIR") {
+            let src_dir = Path::new(&src_dir_str);
+            normalize_path(src_dir, "$SRC_DIR");
+        }
+
         // Paths into the build directory
         let test_build_dir = &self.config.build_base;
         normalize_path(test_build_dir, "$TEST_BUILD_DIR");