summaryrefslogtreecommitdiff
path: root/test/consumer/build.zig
diff options
context:
space:
mode:
Diffstat (limited to 'test/consumer/build.zig')
-rw-r--r--test/consumer/build.zig20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/consumer/build.zig b/test/consumer/build.zig
new file mode 100644
index 0000000..9fc2c77
--- /dev/null
+++ b/test/consumer/build.zig
@@ -0,0 +1,20 @@
+//! A package that depends on cloud9 as any other does: cloud9's `test`
+//! step runs `zig build test` here, so its build API is used the way a
+//! consumer uses it (modules by name, no option).
+const std = @import("std");
+
+pub fn build(b: *std.Build) void {
+ const target = b.standardTargetOptions(.{});
+ const optimize = b.standardOptimizeOption(.{});
+ const cloud9 = b.dependency("cloud9", .{});
+ const tests = b.addTest(.{ .root_module = b.createModule(.{
+ .root_source_file = b.path("main.zig"),
+ .target = target,
+ .optimize = optimize,
+ .imports = &.{
+ .{ .name = "cloud9", .module = cloud9.module("cloud9") },
+ .{ .name = "9proc", .module = cloud9.module("9proc") },
+ },
+ }) });
+ b.step("test", "a client and a server on cloud9 talk over a socket pair").dependOn(&b.addRunArtifact(tests).step);
+}