summaryrefslogtreecommitdiff
path: root/build/tests.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-18 21:43:03 -0300
committerGabriel Schneider <[email protected]>2026-11-18 22:03:06 -0300
commit92d553123673376adf6126ab90d49a22c5b833d2 (patch)
tree2a4e83a7e5a0d8766358ce87ccebba72b95f9a2a /build/tests.zig
parentf9a3179542012ec1a700e2020ac9f616b819f972 (diff)
downloadpardes-92d553123673376adf6126ab90d49a22c5b833d2.tar.gz
pardes-92d553123673376adf6126ab90d49a22c5b833d2.zip
abi: plain.zig and term.zig, the addon header and its Zig module, pardes.h and the replica stream's wire into abi/ (the reorganisation's tree, step 2c; abi.zig, the seam, is step 12's): plain, the addon's and pardes.h's modules as before from their new place, the wire a module of its own (`wire`, named by the core, the runtime and main.zig); shell-test runs the wire's tests on the core's set, since a window's set links the window's C, whose allocator gui.zig holds; nothing else changes: the ledger, 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.zig10
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",