Skip to content

Commit

Permalink
Re run attempt 10; Printing the coverage command run with bazel test …
Browse files Browse the repository at this point in the history
…--collect_code_coverage output to view shard coverage data
  • Loading branch information
Rd4dev committed Jul 21, 2024
1 parent 3d78a86 commit 5ea0739
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -175,14 +175,18 @@ class BazelClient(private val rootDirectory: File, private val commandExecutor:
val hasShardCount = buildRule.any { "shard_count" in it }
if (hasShardCount) {
println("In has Shard count")
// val coverageCommandOutputLines = executeBazelCommand(
executeBazelCommand(
val coverageCommandOutputLines = executeBazelCommand(
// executeBazelCommand(
"test",
"--collect_code_coverage",
"--combined_report=lcov",
bazelTestTarget,
"--instrumentation_filter=$computeInstrumentation"
)
println(
"Coverage command output lines " +
"with bazel tests --collect coverage: $coverageCommandOutputLines"
)
return File(rootDirectory, "/bazel-out/_coverage/_coverage_report.dat").readLines()
} else {
println("In does not have Shard count")
Expand Down

0 comments on commit 5ea0739

Please sign in to comment.