From 59391ddce9ff6742aa2a0c24071753d447baffb1 Mon Sep 17 00:00:00 2001 From: adybag14-cyber Date: Fri, 29 May 2026 05:34:25 +0100 Subject: [PATCH] test(zigux): add bitmap-window bench replay runner --- ...hase1_bitmap_window_bench_replay_build.zig | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 zigux/tests/phase1_bitmap_window_bench_replay_build.zig diff --git a/zigux/tests/phase1_bitmap_window_bench_replay_build.zig b/zigux/tests/phase1_bitmap_window_bench_replay_build.zig new file mode 100644 index 00000000000000..d3dbb19b3dc9a6 --- /dev/null +++ b/zigux/tests/phase1_bitmap_window_bench_replay_build.zig @@ -0,0 +1,37 @@ +const std = @import("std"); + +pub fn build(b: *std.Build) void { + const target = b.standardTargetOptions(.{}); + const optimize = b.standardOptimizeOption(.{ .preferred_optimize_mode = .ReleaseSafe }); + + const find_bit_module = b.addModule("find_bit", .{ + .root_source_file = b.path("../../tools/lib/find_bit.zig"), + .target = target, + .optimize = optimize, + }); + + const bitmap_module = b.addModule("bitmap", .{ + .root_source_file = b.path("../../tools/lib/bitmap.zig"), + .target = target, + .optimize = optimize, + }); + bitmap_module.addImport("find_bit", find_bit_module); + + const replay_tests = b.addTest(.{ + .root_module = b.createModule(.{ + .root_source_file = b.path("phase1_bitmap_window_bench_replay.zig"), + .target = target, + .optimize = optimize, + }), + }); + replay_tests.root_module.addImport("bitmap", bitmap_module); + replay_tests.root_module.addImport("find_bit", find_bit_module); + + const run_replay_tests = b.addRunArtifact(replay_tests); + + const replay_step = b.step("phase1-bitmap-window-bench-replay", "Run the Phase 1 bitmap-window bench replay"); + replay_step.dependOn(&run_replay_tests.step); + + const test_step = b.step("test", "Run the Phase 1 bitmap-window bench replay"); + test_step.dependOn(&run_replay_tests.step); +}