also looking at this
Add deterministic test sharding for distributed CI
#22
10 files
+322
-5
| @@ -161,6 +161,10 @@ pub fn main(init: std.process.Init.Minimal) !void { | ||
| 161 | 161 | } |
| 162 | 162 | |
| 163 | 163 | 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; | |
| 164 | 168 | |
| 165 | 169 | // Check if watch mode is enabled |
| 166 | 170 | if (cli_parser.options.watch) { |
| @@ -201,6 +205,7 @@ pub fn main(init: std.process.Init.Minimal) !void { | ||
| 201 | 205 | .filter = cli_parser.options.filter, |
| 202 | 206 | .verbose = cli_parser.options.verbose, |
| 203 | 207 | .use_colors = !cli_parser.options.no_color, |
| 208 | .shard = shard_options, | |
| 204 | 209 | .coverage_options = cov_opts, |
| 205 | 210 | .ui_server = if (ui_server) |*server| server else null, |
| 206 | 211 | }; |
| @@ -239,6 +244,7 @@ pub fn main(init: std.process.Init.Minimal) !void { | ||
| 239 | 244 | .filter = cli_parser.options.filter, |
| 240 | 245 | .verbose = cli_parser.options.verbose, |
| 241 | 246 | .use_colors = !cli_parser.options.no_color, |
| 247 | .shard = shard_options, | |
| 242 | 248 | .coverage_options = cov_opts, |
| 243 | 249 | .ui_server = if (ui_server) |*server| server else null, |
| 244 | 250 | }; |