From f7442cb1f23ce10ccedaa37b1851d751f689943d Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Wed, 4 Nov 2026 19:19:26 -0300 Subject: test: the process tests run on each backend (the user: an effect's test is its backend's): zig build process-test -Dplatform=tty drives pardes, -Dplatform=gui drives pardes-gui hidden (PARDES_TEST, SDL_VIDEO_DRIVER=offscreen, no display of the user's touched) on a pty of its own and a detached session's 160x50 grid, its frames and status in a capture directory of its own, Detached.frame() waiting for it to say it is idle; the runner told its backend (--backend, from the build), each line marked [tty] or [gui] with its time, a case that skips said so; the terminal frontend's and a detached session's own cases (pardes -, a killed tty editor, a signalled detached session, a message expiring with nothing attached) process.only(.tty), a detached session's size checks and pty pixel cells the tty's alone; the canary tty-only for now (on the window its Newcol is refused after the terminal steps, docs/next-tests.md); tty 36 of 36, gui 31 and 5 skipped Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge --- test/process/flags.zig | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test/process/flags.zig') diff --git a/test/process/flags.zig b/test/process/flags.zig index fffc2867..41aacc03 100644 --- a/test/process/flags.zig +++ b/test/process/flags.zig @@ -652,6 +652,8 @@ fn commandBody(a: std.mem.Allocator, c: *Conn, node: []const u8) ![]const u8 { } fn outside(gpa: std.mem.Allocator, exe: [:0]const u8) !void { + // The terminal frontend's and a detached session's own: a window is neither. + try process.only(.tty); var arena = std.heap.ArenaAllocator.init(gpa); defer arena.deinit(); const a = arena.allocator(); @@ -696,6 +698,8 @@ fn socketFile(path: []const u8) !void { } fn killedTty(gpa: std.mem.Allocator, exe: [:0]const u8) !void { + // The terminal frontend's and a detached session's own: a window is neither. + try process.only(.tty); var arena = std.heap.ArenaAllocator.init(gpa); defer arena.deinit(); const a = arena.allocator(); @@ -758,6 +762,8 @@ fn daemonGone(d: *const process.Detached) void { } fn signalCleansUp(gpa: std.mem.Allocator, exe: [:0]const u8) !void { + // The terminal frontend's and a detached session's own: a window is neither. + try process.only(.tty); // A detached session told to stop by a signal unlinks its sockets. A // hangup is a terminal's end, not a session's: the daemon keeps it. for ([_]libc.SIG{ .TERM, .INT, .HUP }) |first| { -- cgit v1.3