diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-18 21:23:22 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-18 21:43:03 -0300 |
| commit | f9a3179542012ec1a700e2020ac9f616b819f972 (patch) | |
| tree | 73f4cb241876196331f7b28c9f773301bd341a7f /build/tests.zig | |
| parent | a75956bb3443aa8aac778d2ff12c42f5ef99e0e9 (diff) | |
| download | pardes-f9a3179542012ec1a700e2020ac9f616b819f972.tar.gz pardes-f9a3179542012ec1a700e2020ac9f616b819f972.zip | |
dev: the frontends (dev/tui, dev/gui, the macOS app's Swift and resources in dev/macos), host_io, file_watch, fonts, the lsp client and Scip, Art, jump_trail, glide and vaxis_input into dev/ (the reorganisation's tree, step 2b): module `dev` (dev/root.zig) beside the core and the runtime, each naming the others; the window wired into it, sketchbook's devices imported as `sketchbook` (its `dev` would be ours); pardes.zig keeps its re-exports (host_io, file_watch, glide, fonts) so every caller reads as before; core-test and shell-test run the devices' test program too, so the same tests run (the ledger, tui and gui); nothing else changes: 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 | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/build/tests.zig b/build/tests.zig index 2d43d743..d351684d 100644 --- a/build/tests.zig +++ b/build/tests.zig @@ -9,9 +9,9 @@ const program = tools.program; /// addon-test (and the addons it loads), kitty-test, the 9P roots. pub fn add(b: *std.Build, c: struct { addon_mod: *std.Build.Module, - /// The core without a terminal and the runtime beside it: core-test. + /// The core without a terminal and the devices and runtime beside it: core-test. core_lean: core.Modules, - /// The shell's root, core and runtime: shell-test. + /// The shell's root, core, devices and runtime: shell-test. root_set: core.Modules, core_module: *std.Build.Module, /// core_module's configuration, for the test roots that run on its imports. @@ -63,9 +63,9 @@ pub fn add(b: *std.Build, c: struct { // The perf and fs bench programs' own tests: they compile no editor. _ = units.add(b, units.root(b, "test/perf.zig", true, &.{.{ .name = "perf_options", .module = c.tools.perf_options.createModule() }}), null); _ = units.add(b, units.root(b, "test/fs_bench.zig", null, &.{}), null); - const core_test_step = b.step("core-test", "run core tests without native shell tests, on the core without a terminal (a test that needs one skips), and the runtime's beside it"); + const core_test_step = b.step("core-test", "run core tests without native shell tests, on the core without a terminal (a test that needs one skips), and the devices' and the runtime's beside it"); const core_match = testMatch(b, c.unit_profile, c.test_filters, core_test_step); - for ([_]*std.Build.Module{ c.core_lean.core, c.core_lean.runtime }) |m| { + for ([_]*std.Build.Module{ c.core_lean.core, c.core_lean.dev, c.core_lean.runtime }) |m| { const core_test = b.addTest(.{ .root_module = m, .filters = c.test_filters }); const run_core_test = b.addRunArtifact(core_test); run_core_test.has_side_effects = true; @@ -211,18 +211,18 @@ pub fn add(b: *std.Build, c: struct { const protocol_step = b.step("9p-test", "run freestanding 9P protocol tests"); 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, "src/fonts.zig", true, cloud9), null); + _ = 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); // 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, units.root(b, "test/deck/replay.zig", null, &.{.{ .name = "deck", .module = b.createModule(.{ .target = c.target, .optimize = c.optimize, .root_source_file = b.path("src/gui/deck.zig") }) }}), 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); if (c.platform == .tui or c.platform == .gui) { // The native shell's tests alone, without the perf gate's // ReleaseFast build: what a -Dtest-filter iteration wants. - const shell_test_step = b.step("shell-test", "run the native shell's unit tests (runtime/main.zig's, and its core's and runtime's)"); - for ([_]*std.Build.Module{ c.root_set.root, c.root_set.core, c.root_set.runtime }) |m| + const shell_test_step = b.step("shell-test", "run the native shell's unit tests (runtime/main.zig's, and its core's, devices' and runtime's)"); + for ([_]*std.Build.Module{ c.root_set.root, c.root_set.core, c.root_set.dev, c.root_set.runtime }) |m| shell_test_step.dependOn(&units.add(b, b.addTest(.{ .root_module = m, .filters = c.test_filters }), null).step); const profile_test = b.addExecutable(.{ .name = "pardes-unit-profile-test", |
