Reuse the workspace target for fixture builds

This commit is contained in:
2026-11-07 10:50:30 +00:00
parent b605717b4d
commit 44797f1302
4 changed files with 7 additions and 12 deletions
+2 -5
View File
@@ -24,10 +24,7 @@ fn git(cwd: &Path, args: &[&str]) {
async fn several_mb_git_push() {
static BUILT: OnceLock<std::path::PathBuf> = OnceLock::new();
let component = BUILT.get_or_init(|| {
let target = std::path::PathBuf::from(
std::env::var_os("CARGO_TARGET_DIR")
.expect("CARGO_TARGET_DIR must name the executor's shared target directory"),
);
let target = Path::new(env!("CARGO_TARGET_TMPDIR")).parent().unwrap();
let userland = Path::new(env!("CARGO_MANIFEST_DIR")).join("../userland");
if !userland.join("cwd-init/init.o").is_file() {
assert!(
@@ -46,7 +43,7 @@ async fn several_mb_git_push() {
.arg(manifest)
.current_dir(&userland)
.args(["--target", "wasm32-wasip2", "--target-dir"])
.arg(&target)
.arg(target)
.args(["-j", "2", "--locked"])
.status()
.unwrap()