summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-04 11:03:55 -0300
committerGabriel Schneider <[email protected]>2026-11-04 11:03:55 -0300
commit21e09998114a866ae76ecef68d660e84561daa44 (patch)
tree12237b50e772df336e2c8fc7d59cfd69607d4afb /build
parent5752e5c94f27eced137f4ca061c68715d8b7131a (diff)
downloadpardes-21e09998114a866ae76ecef68d660e84561daa44.tar.gz
pardes-21e09998114a866ae76ecef68d660e84561daa44.zip
test: the process runner, test/process.zig (docs/next-tests.md, the user's one runner): Files, a running pardes's file tree over its socket with Session's method names (read, write, expect, keys, click, where, screen, focused, newPane, at), dialled by pid or path, and Detached, a `pardes --detach` in a throwaway root that is its HOME, runtime and config directory, with no daemon (PARDES_DAEMON=off) so nothing outlives it, its stderr kept and said if it exits early; the pty mode is e2e_harness's Harness with process.of; the process-test step runs test/process_test.zig over test/process/*.zig, its first case fs.py's keys_and_mouse (gone from fs.py); snap9p reads /screen through Files; all 113 snap scripts pass
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'build')
-rw-r--r--build/snap.zig22
1 files changed, 22 insertions, 0 deletions
diff --git a/build/snap.zig b/build/snap.zig
index ad06486a..14e0aef3 100644
--- a/build/snap.zig
+++ b/build/snap.zig
@@ -41,6 +41,28 @@ pub fn addTty(b: *std.Build, opts: struct {
.link_libc = true,
}),
});
+ // The process tests (test/process_test.zig): real sessions over their
+ // sockets, on the runner the snap scripts share (test/process.zig).
+ const process_test = b.addExecutable(.{
+ .name = "pardes-process-test",
+ .root_module = b.createModule(.{
+ .target = opts.target,
+ .optimize = opts.optimize,
+ .root_source_file = b.path("test/process_test.zig"),
+ .link_libc = true,
+ }),
+ });
+ if (opts.ghostty_vt) |vt| process_test.root_module.addImport("ghostty-vt", vt);
+ process_test.root_module.addImport("9p_io", ninep_client);
+ switch (opts.target.result.os.tag) {
+ .freebsd, .netbsd, .openbsd => process_test.root_module.linkSystemLibrary("util", .{}),
+ else => {},
+ }
+ const run_process_test = b.addRunArtifact(process_test);
+ run_process_test.addArtifactArg(opts.exe);
+ run_process_test.addPassthruArgs();
+ run_process_test.has_side_effects = true;
+ b.step("process-test", "run the process tests: real sessions driven over their sockets (-- [filter])").dependOn(&run_process_test.step);
const run_snap = b.addRunArtifact(snap);
run_snap.addArtifactArg(opts.exe);
run_snap.addPrefixedFileArg("--lspmock=", lspmock.getEmittedBin());