summaryrefslogtreecommitdiff
path: root/build/tests.zig
diff options
context:
space:
mode:
Diffstat (limited to 'build/tests.zig')
-rw-r--r--build/tests.zig13
1 files changed, 13 insertions, 0 deletions
diff --git a/build/tests.zig b/build/tests.zig
index 6ed97299..b7c7a5e7 100644
--- a/build/tests.zig
+++ b/build/tests.zig
@@ -135,6 +135,19 @@ pub fn add(b: *std.Build, c: struct {
const liar_mod = b.createModule(.{ .root_source_file = b.path("test/liar.zig"), .target = c.target, .optimize = c.optimize, .imports = &.{.{ .name = "addon", .module = c.addon_mod }} });
const liar_lib = b.addLibrary(.{ .name = "liar", .linkage = .dynamic, .root_module = liar_mod });
for ([_]*std.Build.Step.Compile{ snake_lib, life_lib, liar_lib }) |lib| addon_test_step.dependOn(&b.addInstallArtifact(lib, .{}).step);
+ // The replicas' soak, its clients showing a picture, a PDF and a game
+ // of life from these libraries, as a user's addons are loaded.
+ const replicas = program(b, "pardes-replicas", "test/replicas.zig", c.target, c.optimize, &.{ .{ .name = "pardes", .module = c.core_module }, .{ .name = "term", .module = c.parts.term } });
+ const run_replicas = b.addRunArtifact(replicas);
+ for ([_]?*std.Build.Step.Compile{ c.image_addon, life_lib, c.pdf_addon }) |l| if (l) |lib| {
+ run_replicas.addArg("--addon");
+ run_replicas.addArtifactArg(lib);
+ };
+ run_replicas.addArg("--pdf");
+ run_replicas.addFileArg(b.path("docs/design.pdf"));
+ run_replicas.addPassthruArgs();
+ run_replicas.has_side_effects = true;
+ b.step("replicas", "one authority and several replicas in process, each client typing over a delayed link: digests at quiescence, rollback rate and costs per RTT (-- [--seeds N] [--steps M] [--clients C] [--rtt 30,80,207])").dependOn(&run_replicas.step);
for ([_]*std.Build.Module{ snake_mod, life_mod, liar_mod, c.parts.image }) |m| addon_test_step.dependOn(&b.addRunArtifact(b.addTest(.{ .root_module = m })).step);
// ...and the pdf addon's, which mupdf-check runs too (its script
// opens docs/design.pdf, from the build root).