diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-18 22:03:14 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-18 22:23:51 -0300 |
| commit | 99f5b10eccd95aa0066ea6fe6bb75f367ab56a47 (patch) | |
| tree | 813596ea84318a7bae4fd7416ba463de8e3b7107 /build/tests.zig | |
| parent | 92d553123673376adf6126ab90d49a22c5b833d2 (diff) | |
| download | pardes-99f5b10eccd95aa0066ea6fe6bb75f367ab56a47.tar.gz pardes-99f5b10eccd95aa0066ea6fe6bb75f367ab56a47.zip | |
core: src/ becomes core/, pardes.zig its root.zig (the reorganisation's tree, step 2d), and every mention of a src/ path follows: the build's paths, the core's imports of its root, the tests that read the repository's files by path (lspbench's, look.zig's spans over core/look.zig), the comments that cite files, the documents and the manual (the typst corpus reads core/tutor.txt and core/plumbing); left as they were: the /src tree's served names (src/pardes.zig and the rest are the 9P tree's, not the repository's), the CHANGELOG's history, fixtures that are only strings; fs-unit-test runs from the core's root (a module of the core rooted at fs.zig had the runtime's and the devices' `core` be fs.zig); nothing else changes: the ledger (pardes.test.* now root.test.*), frames byte-identical, replicas and process-test the base's
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
Diffstat (limited to 'build/tests.zig')
| -rw-r--r-- | build/tests.zig | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/build/tests.zig b/build/tests.zig index 0eaf7c63..fe9e1355 100644 --- a/build/tests.zig +++ b/build/tests.zig @@ -74,9 +74,9 @@ pub fn add(b: *std.Build, c: struct { core_test_step.dependOn(&run_core_test.step); if (core_match) |check| check.addArtifactArg(core_test); } - // The terminal module's own tests (src/term/): the emulator without a core. + // The terminal module's own tests (core/term/): the emulator without a core. const run_term_test = units.add(b, b.addTest(.{ .root_module = c.parts.term, .filters = c.test_filters }), null); - b.step("term-test", "run the terminal module's own tests (src/term/)").dependOn(&run_term_test.step); + b.step("term-test", "run the terminal module's own tests (core/term/)").dependOn(&run_term_test.step); // test/terminal.zig reads the emulator behind a core's terminal. const pane_tests = units.root(b, "test/panes.zig", true, &.{ .{ .name = "pardes", .module = c.core_module }, .{ .name = "term", .module = c.parts.term }, .{ .name = "plain", .module = c.parts.plain } }); if (c.ghostty_vt_for_tests) |x| pane_tests.root_module.addImport("ghostty-vt", x); @@ -193,13 +193,14 @@ pub fn add(b: *std.Build, c: struct { // pty and the shell's output, is the kitty-harness step. _ = units.add(b, units.root(b, "test/kitty.zig", true, &.{.{ .name = "pardes", .module = c.core_module }}), b.step("kitty-test", "run the kitty graphics conformance cases for terminal panes")); - // 9p_io.zig's and fs.zig's tests as roots of their own, on the - // core's imports and C libraries: native transport integration - // stays reachable even when Zig's filter leaves the core's - // anonymous test-import block out. + // 9p_io.zig's and fs.zig's tests on the core's imports and C + // libraries: native transport integration stays reachable even when + // Zig's filter leaves the core's anonymous test-import block out. Each + // from its module's root (runtime/root.zig, core/root.zig): the + // modules name each other by module, whose `core` is the core's root. for ([_]struct { path: []const u8, step: []const u8, about: []const u8, filters: []const []const u8 }{ .{ .path = "runtime/root.zig", .step = "9p-io-test", .about = "run native 9P transport and client integration tests", .filters = &.{ "Unix and TCP", "one fetch", "expired sessions", "posts itself" } }, - .{ .path = "src/fs.zig", .step = "fs-unit-test", .about = "run filesystem unit tests", .filters = c.test_filters }, + .{ .path = "core/root.zig", .step = "fs-unit-test", .about = "run filesystem unit tests", .filters = c.test_filters }, }) |t| { var cfg = c.core_cfg; cfg.root = t.path; @@ -214,9 +215,9 @@ pub fn add(b: *std.Build, c: struct { protocol_step.dependOn(&units.add(b, protocol_tests, null).step); if (testMatch(b, c.unit_profile, c.test_filters, protocol_step)) |check| check.addArtifactArg(protocol_tests); _ = units.add(b, units.root(b, "dev/fonts.zig", true, cloud9), null); - _ = units.add(b, units.root(b, "src/c_heap.zig", false, cloud9), null); + _ = units.add(b, units.root(b, "core/c_heap.zig", false, cloud9), null); // Its lookup goes wrong only where the optimizer folds it. - _ = units.add(b, b.addTest(.{ .root_module = b.createModule(.{ .target = c.target, .optimize = .safe, .root_source_file = b.path("src/c_heap.zig"), .link_libc = false, .imports = cloud9 }), .filters = c.test_filters }), null); + _ = units.add(b, b.addTest(.{ .root_module = b.createModule(.{ .target = c.target, .optimize = .safe, .root_source_file = b.path("core/c_heap.zig"), .link_libc = false, .imports = cloud9 }), .filters = c.test_filters }), null); _ = units.add(b, units.root(b, "test/deck/replay.zig", null, &.{.{ .name = "deck", .module = b.createModule(.{ .target = c.target, .optimize = c.optimize, .root_source_file = b.path("dev/gui/deck.zig") }) }}), null); |
