diff options
Diffstat (limited to 'build/tests.zig')
| -rw-r--r-- | build/tests.zig | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/build/tests.zig b/build/tests.zig index d351684d..0eaf7c63 100644 --- a/build/tests.zig +++ b/build/tests.zig @@ -13,6 +13,8 @@ pub fn add(b: *std.Build, c: struct { core_lean: core.Modules, /// The shell's root, core, devices and runtime: shell-test. root_set: core.Modules, + /// The wire (abi/wire.zig) on the core's configuration: shell-test's. + core_wire: *std.Build.Module, core_module: *std.Build.Module, /// core_module's configuration, for the test roots that run on its imports. core_cfg: core.Core, @@ -65,7 +67,7 @@ pub fn add(b: *std.Build, c: struct { _ = 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 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.dev, c.core_lean.runtime }) |m| { + for ([_]*std.Build.Module{ c.core_lean.core, c.core_lean.dev, c.core_lean.runtime, c.core_lean.wire }) |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; @@ -112,7 +114,7 @@ pub fn add(b: *std.Build, c: struct { .{ "fake_addon_no_dump", "-DFAKE_NO_DUMP" }, }) |variant| { const lib = b.addLibrary(.{ .name = variant[0], .linkage = .dynamic, .root_module = b.createModule(.{ .target = c.target, .optimize = c.optimize, .link_libc = true }) }); - lib.root_module.addIncludePath(b.path("src/kinds")); + lib.root_module.addIncludePath(b.path("abi")); const name_flag = if (std.mem.eql(u8, variant[0], "fake_addon_abi")) "-DFAKE_NAME=\"fakeabi\"" else if (std.mem.eql(u8, variant[0], "fake_addon_core_word")) "-DFAKE_NAME=\"fakeword\"" else "-DFAKE_PLAIN"; // The header is the whole contract: it compiles clean under every warning. lib.root_module.addCSourceFile(.{ .file = b.path("addons/fake/fake.c"), .flags = &.{ "-std=c11", "-Wall", "-Wextra", "-Werror", "-Wno-override-init", variant[1], name_flag } }); @@ -222,7 +224,9 @@ pub fn add(b: *std.Build, c: struct { // 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, 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| + // The wire's on the core's own set: a window's set links the window's C, + // whose allocator is gui.zig's, which nothing in the wire reaches. + for ([_]*std.Build.Module{ c.root_set.root, c.root_set.core, c.root_set.dev, c.root_set.runtime, c.core_wire }) |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", |
