diff options
Diffstat (limited to 'build.zig')
| -rw-r--r-- | build.zig | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -23,7 +23,14 @@ pub fn build(b: *std.Build) void { .optimize = optimize, }); const tests = b.addTest(.{ .root_module = module }); - b.step("test", "Run protocol and session tests").dependOn(&b.addRunArtifact(tests).step); + const test_step = b.step("test", "Run protocol and session tests, and test/consumer's"); + test_step.dependOn(&b.addRunArtifact(tests).step); + // The build API as a package that depends on cloud9 sees it: + // test/consumer's own `zig build test`. + const consumer = b.addSystemCommand(&.{ b.graph.zig_exe, "build", "test" }); + consumer.setCwd(b.path("test/consumer")); + consumer.has_side_effects = true; + test_step.dependOn(&consumer.step); const wasm_target = b.resolveTargetQuery(.{ .cpu_arch = .wasm32, .os_tag = .freestanding }); const wasm_core = b.createModule(.{ .root_source_file = b.path("src/root.zig"), |
