$OpenBSD: patch-src_tools_cargo_crates_cargo-test-support_src_paths_rs,v 1.6 2021/09/09 15:07:40 semarie Exp $

Index: src/tools/cargo/crates/cargo-test-support/src/paths.rs
--- src/tools/cargo/crates/cargo-test-support/src/paths.rs.orig
+++ src/tools/cargo/crates/cargo-test-support/src/paths.rs
@@ -22,9 +22,7 @@ lazy_static! {
 /// This is used when running cargo is pre-CARGO_TARGET_TMPDIR
 /// TODO: Remove when CARGO_TARGET_TMPDIR grows old enough.
 fn global_root_legacy() -> PathBuf {
-    let mut path = t!(env::current_exe());
-    path.pop(); // chop off exe name
-    path.pop(); // chop off "deps"
+    let path = PathBuf::from("${WRKBUILD}/test-cargo");
     path.push("tmp");
     path.mkdir_p();
     path
