ReviewOS

also looking at this

zig-utils/zig-test-framework

Add deterministic test sharding for distributed CI

#22
Merged glennmichael123 wants to merge codex/issue-4-deterministic-sharding into main
10 files +322 -5
src/main.zigmodified+6-0
Changes to src/main.zig
@@ -161,6 +161,10 @@ pub fn main(init: std.process.Init.Minimal) !void {
161161 }
162162
163163 var all_passed: bool = undefined;
164 const shard_options: ?lib.ShardOptions = if (cli_parser.options.shard_index) |index|
165 .{ .index = index, .count = cli_parser.options.shard_count.? }
166 else
167 null;
164168
165169 // Check if watch mode is enabled
166170 if (cli_parser.options.watch) {
@@ -201,6 +205,7 @@ pub fn main(init: std.process.Init.Minimal) !void {
201205 .filter = cli_parser.options.filter,
202206 .verbose = cli_parser.options.verbose,
203207 .use_colors = !cli_parser.options.no_color,
208 .shard = shard_options,
204209 .coverage_options = cov_opts,
205210 .ui_server = if (ui_server) |*server| server else null,
206211 };
@@ -239,6 +244,7 @@ pub fn main(init: std.process.Init.Minimal) !void {
239244 .filter = cli_parser.options.filter,
240245 .verbose = cli_parser.options.verbose,
241246 .use_colors = !cli_parser.options.no_color,
247 .shard = shard_options,
242248 .coverage_options = cov_opts,
243249 .ui_server = if (ui_server) |*server| server else null,
244250 };