+5
-2
build.zig
+5
-2
build.zig
···
46
46
const run_step = b.step("run", "Run the feed server");
47
47
run_step.dependOn(&run_cmd.step);
48
48
49
-
// tests
49
+
// tests - use main.zig as root, tests in all imported modules run automatically
50
50
const tests = b.addTest(.{
51
51
.root_module = b.createModule(.{
52
-
.root_source_file = b.path("src/test_root.zig"),
52
+
.root_source_file = b.path("src/main.zig"),
53
53
.target = target,
54
54
.optimize = optimize,
55
55
.imports = &.{
56
+
.{ .name = "websocket", .module = websocket.module("websocket") },
57
+
.{ .name = "zqlite", .module = zqlite.module("zqlite") },
56
58
.{ .name = "zat", .module = zat.module("zat") },
57
59
},
58
60
}),
59
61
});
62
+
tests.linkLibC();
60
63
61
64
const run_tests = b.addRunArtifact(tests);
62
65
const test_step = b.step("test", "Run unit tests");
+5
src/main.zig
+5
src/main.zig