summaryrefslogtreecommitdiff
path: root/build/tests.zig
diff options
context:
space:
mode:
Diffstat (limited to 'build/tests.zig')
-rw-r--r--build/tests.zig19
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);