From a02a2219eed3eeecad7bf28d8cabdfb053bbf1ce Mon Sep 17 00:00:00 2001 From: mlugg Date: Fri, 20 Jun 2025 00:24:57 +0100 Subject: [PATCH 1/2] standalone: add accidentally-excluded test --- test/standalone/build.zig.zon | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/standalone/build.zig.zon b/test/standalone/build.zig.zon index 652f6bbb4a..635d36d510 100644 --- a/test/standalone/build.zig.zon +++ b/test/standalone/build.zig.zon @@ -204,6 +204,9 @@ .entry_point = .{ .path = "entry_point", }, + .run_cwd = .{ + .path = "run_cwd", + }, }, .paths = .{ "build.zig", From 4a9e8b73aa9042c17d03d3de4d9070a913db2193 Mon Sep 17 00:00:00 2001 From: mlugg Date: Fri, 20 Jun 2025 00:33:44 +0100 Subject: [PATCH 2/2] std.Build.Step.Run: pass correct relative cache dir to tests Fixes an additional bug reported in the closed #24216. --- lib/std/Build/Step/Run.zig | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/std/Build/Step/Run.zig b/lib/std/Build/Step/Run.zig index eb5ea1c607..5414021f3b 100644 --- a/lib/std/Build/Step/Run.zig +++ b/lib/std/Build/Step/Run.zig @@ -204,11 +204,10 @@ pub fn setName(run: *Run, name: []const u8) void { pub fn enableTestRunnerMode(run: *Run) void { const b = run.step.owner; - const arena = b.allocator; run.stdio = .zig_test; + run.addPrefixedDirectoryArg("--cache-dir=", .{ .cwd_relative = b.cache_root.path orelse "." }); run.addArgs(&.{ - std.fmt.allocPrint(arena, "--seed=0x{x}", .{b.graph.random_seed}) catch @panic("OOM"), - std.fmt.allocPrint(arena, "--cache-dir={s}", .{b.cache_root.path orelse ""}) catch @panic("OOM"), + b.fmt("--seed=0x{x}", .{b.graph.random_seed}), "--listen=-", }); }