mirror of
https://github.com/ziglang/zig.git
synced 2025-12-06 14:23:09 +00:00
std.Build.Step.Run: pass correct relative cache dir to tests
Fixes an additional bug reported in the closed #24216.
This commit is contained in:
parent
a02a2219ee
commit
4a9e8b73aa
@ -204,11 +204,10 @@ pub fn setName(run: *Run, name: []const u8) void {
|
|||||||
|
|
||||||
pub fn enableTestRunnerMode(run: *Run) void {
|
pub fn enableTestRunnerMode(run: *Run) void {
|
||||||
const b = run.step.owner;
|
const b = run.step.owner;
|
||||||
const arena = b.allocator;
|
|
||||||
run.stdio = .zig_test;
|
run.stdio = .zig_test;
|
||||||
|
run.addPrefixedDirectoryArg("--cache-dir=", .{ .cwd_relative = b.cache_root.path orelse "." });
|
||||||
run.addArgs(&.{
|
run.addArgs(&.{
|
||||||
std.fmt.allocPrint(arena, "--seed=0x{x}", .{b.graph.random_seed}) catch @panic("OOM"),
|
b.fmt("--seed=0x{x}", .{b.graph.random_seed}),
|
||||||
std.fmt.allocPrint(arena, "--cache-dir={s}", .{b.cache_root.path orelse ""}) catch @panic("OOM"),
|
|
||||||
"--listen=-",
|
"--listen=-",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user