diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-17 05:38:26 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-17 12:15:01 -0300 |
| commit | d3742ddf2b3a85eb3935cb35e958fa27f1293a6b (patch) | |
| tree | b47dce7b82e72673432f6c8746517386c67ab742 /test/process.zig | |
| parent | b65048ac19f9f47b6faa21d1a9f3d06ba3ff1a95 (diff) | |
| parent | 81c4157b6731ee64a7bf9194c5df0818e2977f5d (diff) | |
| download | pardes-d3742ddf2b3a85eb3935cb35e958fa27f1293a6b.tar.gz pardes-d3742ddf2b3a85eb3935cb35e958fa27f1293a6b.zip | |
integration: the GPU move whole, with the terminal a module of its own, the plumber and the diff work
A merge of pardes-next (uoqyunnw) and gpu-s4b (zxswllzu). One conflict, build.zig: core-test's root is the core without a terminal AND the Cells and Atlas tests join the unit suite; gui.zig merged by itself and is formatted (two role casts spelled as zig fmt spells them, two blank lines). Gated against a baseline recorded from pardes-next with the gate's test hooks and the renderer still in gui.zig (.scratch/sketch/gpu/mbase): frame corpus 77/77 identical in Debug and in ReleaseFast, the gated window -0.032% instructions (threshold 0.5%), unit-test on gui 1583/1591 with no failure the baseline has not, every GPU counter 0; on tui core-test 810/949 (139 skipped), shell-test 989/992, behaviour-test 269/273 (the four addon ABI tests the base fails).
Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
Diffstat (limited to 'test/process.zig')
| -rw-r--r-- | test/process.zig | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/test/process.zig b/test/process.zig index 67d883ca..126a7924 100644 --- a/test/process.zig +++ b/test/process.zig @@ -616,12 +616,22 @@ pub const Detached = struct { try std.fmt.bufPrintSentinel(&bufs[1], "--9p={s}", .{opts.socket orelse name}, 0) else try std.fmt.bufPrintSentinel(&bufs[1], "--detach={s}", .{name}, 0); + // PARDES_TEST_WRAP: a command a window runs under (`perf stat ...`, + // a script), given the window's own argv; the binary made absolute, + // as the child runs elsewhere. + const wrap = if (gui) std.c.getenv("PARDES_TEST_WRAP") else null; + var exe_buf: [4096]u8 = undefined; var argv: [24][:0]const u8 = undefined; - if (opts.args.len + 3 > argv.len) return error.TooManyArgs; - argv[0] = exe; - argv[1] = first; - for (opts.args, 0..) |a, k| argv[2 + k] = a; - argv[2 + opts.args.len] = fixture; + if (opts.args.len + 4 > argv.len) return error.TooManyArgs; + var at: usize = 0; + if (wrap) |w| { + argv[0] = std.mem.span(w); + at = 1; + } + argv[at] = if (wrap != null) std.mem.span(realpath(exe, &exe_buf) orelse return error.NoBinary) else exe; + argv[at + 1] = first; + for (opts.args, 0..) |a, k| argv[at + 2 + k] = a; + argv[at + 2 + opts.args.len] = fixture; var grid_buf: [2][8]u8 = undefined; var env: [16][2][:0]const u8 = undefined; var n: usize = 0; @@ -641,7 +651,7 @@ pub const Detached = struct { env[n] = kv; n += 1; } - d.child = try Child.spawn(argv[0 .. 3 + opts.args.len], .{ + d.child = try Child.spawn(argv[0 .. at + 3 + opts.args.len], .{ .root = dir, .env = env[0..n], // A window runs on a terminal of its own, as one started from a |
