Skip to content

Lightpanda: the headless browser designed for AI and automation

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

Adrià Arrufat7e532e7dce12
diff --git a/Makefile b/Makefile
index 49c77b837..cb3fa5a02 100644
--- a/Makefile
+++ b/Makefile
@@ -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:
diff --git a/build.zig b/build.zig
index bb41b48a6..b1754aaab 100644
--- a/build.zig
+++ b/build.zig
@@ -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);