build: let the coverage step's output through, print the report path

This commit is contained in:
Adrià Arrufat committed 2026-10-16 14:06:23 +02:00
1 parent b553b961df
commit 7e532e7dce
2 files changed
+3

No files matched your search

+1
View File
@@ -131,6 +131,7 @@ test:
## Run unit tests under kcov, report in zig-out/coverage/index.html (F= filters)
coverage:
TEST_FILTER="$(or $(F),$(TEST_FILTER))" $(ZIG) build $(ZIGFLAGS) coverage
@echo "Coverage report: zig-out/coverage/index.html"
## Run demo/runner end to end tests
end2end:
+2
View File
@@ -212,6 +212,8 @@ pub fn build(b: *Build) !void {
.test_runner = .{ .path = b.path("src/test_runner.zig"), .mode = .simple },
});
const kcov = b.addSystemCommand(&.{ "kcov", "--clean" });
// Otherwise stdio is checked and the runner's stderr summary fails the step.
kcov.has_side_effects = true;
kcov.addPrefixedDirectoryArg("--include-path=", b.path("src"));
const report = kcov.addOutputDirectoryArg("coverage");
kcov.addArtifactArg(cov_tests);