also looking at this
feat(log): --log-file, and a logger that survives being used
#78
5 files
+691
-37
| @@ -744,6 +744,19 @@ pub fn build(b: *std.Build) void { | ||
| 744 | 744 | }); |
| 745 | 745 | bridge_shell_tests.root_module.link_libc = true; |
| 746 | 746 | |
| 747 | // The host logger's own internals. `test/log_test.zig` already exercises it | |
| 748 | // through the module boundary, which cannot reach the config storage or the | |
| 749 | // formatter — the three places it was wrong. Rooted at the source file so | |
| 750 | // those are reachable. | |
| 751 | const log_unit_tests = b.addTest(.{ | |
| 752 | .root_module = b.createModule(.{ | |
| 753 | .root_source_file = b.path("src/log.zig"), | |
| 754 | .target = target, | |
| 755 | .optimize = optimize, | |
| 756 | }), | |
| 757 | }); | |
| 758 | log_unit_tests.root_module.link_libc = true; | |
| 759 | ||
| 747 | 760 | // The conformance test: what craft declares, against what it dispatches. |
| 748 | 761 | const capability_conformance_tests = b.addTest(.{ |
| 749 | 762 | .root_module = b.createModule(.{ |
| @@ -1115,6 +1128,7 @@ pub fn build(b: *std.Build) void { | ||
| 1115 | 1128 | const run_local_tls_tests = b.addRunArtifact(local_tls_tests); |
| 1116 | 1129 | const run_menu_roles_tests = b.addRunArtifact(menu_roles_tests); |
| 1117 | 1130 | const run_capabilities_tests = b.addRunArtifact(capabilities_tests); |
| 1131 | const run_log_unit_tests = b.addRunArtifact(log_unit_tests); | |
| 1118 | 1132 | const run_bridge_shell_tests = b.addRunArtifact(bridge_shell_tests); |
| 1119 | 1133 | const run_window_lifecycle_tests = b.addRunArtifact(window_lifecycle_tests); |
| 1120 | 1134 | const run_window_registry_tests = b.addRunArtifact(window_registry_tests); |
| @@ -1237,6 +1251,7 @@ pub fn build(b: *std.Build) void { | ||
| 1237 | 1251 | test_step.dependOn(&run_local_tls_tests.step); |
| 1238 | 1252 | test_step.dependOn(&run_menu_roles_tests.step); |
| 1239 | 1253 | test_step.dependOn(&run_capabilities_tests.step); |
| 1254 | test_step.dependOn(&run_log_unit_tests.step); | |
| 1240 | 1255 | test_step.dependOn(&run_bridge_shell_tests.step); |
| 1241 | 1256 | test_step.dependOn(&run_window_lifecycle_tests.step); |
| 1242 | 1257 | test_step.dependOn(&run_window_registry_tests.step); |