also looking at this
Unify discovery and programmatic test execution
#23
12 files
+656
-169
| @@ -286,6 +286,13 @@ pub fn build(b: *std.Build) void { | ||
| 286 | 286 | run_shard_two.addArgs(&.{ "--test-dir", "tests", "--pattern", "sample.test.zig", "--shard-index", "2", "--shard-count", "2", "--no-color" }); |
| 287 | 287 | test_step.dependOn(&run_shard_two.step); |
| 288 | 288 | |
| 289 | const run_discovery_tap = b.addRunArtifact(exe); | |
| 290 | run_discovery_tap.addArgs(&.{ "--test-dir", "tests", "--pattern", "sample.test.zig", "--reporter", "tap", "--no-color" }); | |
| 291 | run_discovery_tap.expectStdOutEqual( | |
| 292 | "TAP version 14\n1..1\n# Subtest: sample.test.zig\nok 1 - sample.test.zig\n", | |
| 293 | ); | |
| 294 | test_step.dependOn(&run_discovery_tap.step); | |
| 295 | ||
| 289 | 296 | const run_version = b.addRunArtifact(exe); |
| 290 | 297 | run_version.addArg("--version"); |
| 291 | 298 | run_version.expectStdErrEqual(b.fmt("Zig Test Framework v{s}\n", .{package_version})); |