summaryrefslogtreecommitdiff
path: root/build.zig
diff options
context:
space:
mode:
Diffstat (limited to 'build.zig')
-rw-r--r--build.zig9
1 files changed, 8 insertions, 1 deletions
diff --git a/build.zig b/build.zig
index 41b9104..65ad242 100644
--- a/build.zig
+++ b/build.zig
@@ -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"),