ReviewOS

also looking at this

craft-native/craft

fix(log): send the page's own log somewhere it can be read

#79
Merged glennmichael123 wants to merge fix/page-log-sink into main
2 files +125 -17
packages/zig/build.zigmodified+13-0
Changes to packages/zig/build.zig
@@ -757,6 +757,17 @@ pub fn build(b: *std.Build) void {
757757 });
758758 log_unit_tests.root_module.link_libc = true;
759759
760 // The page-facing log bridge. It answered `{"ok":true}` and wrote nothing
761 // at all on Linux and Windows, which no test noticed because it had none.
762 const bridge_log_tests = b.addTest(.{
763 .root_module = b.createModule(.{
764 .root_source_file = b.path("src/bridge_log.zig"),
765 .target = target,
766 .optimize = optimize,
767 }),
768 });
769 bridge_log_tests.root_module.link_libc = true;
770
760771 // The conformance test: what craft declares, against what it dispatches.
761772 const capability_conformance_tests = b.addTest(.{
762773 .root_module = b.createModule(.{
@@ -1128,6 +1139,7 @@ pub fn build(b: *std.Build) void {
11281139 const run_local_tls_tests = b.addRunArtifact(local_tls_tests);
11291140 const run_menu_roles_tests = b.addRunArtifact(menu_roles_tests);
11301141 const run_capabilities_tests = b.addRunArtifact(capabilities_tests);
1142 const run_bridge_log_tests = b.addRunArtifact(bridge_log_tests);
11311143 const run_log_unit_tests = b.addRunArtifact(log_unit_tests);
11321144 const run_bridge_shell_tests = b.addRunArtifact(bridge_shell_tests);
11331145 const run_window_lifecycle_tests = b.addRunArtifact(window_lifecycle_tests);
@@ -1251,6 +1263,7 @@ pub fn build(b: *std.Build) void {
12511263 test_step.dependOn(&run_local_tls_tests.step);
12521264 test_step.dependOn(&run_menu_roles_tests.step);
12531265 test_step.dependOn(&run_capabilities_tests.step);
1266 test_step.dependOn(&run_bridge_log_tests.step);
12541267 test_step.dependOn(&run_log_unit_tests.step);
12551268 test_step.dependOn(&run_bridge_shell_tests.step);
12561269 test_step.dependOn(&run_window_lifecycle_tests.step);