Skip to content

Commit

Permalink
Printing out coverage report data utilizing collect coverage flag
Browse files Browse the repository at this point in the history
This doesn't change any logic of the coverage retrieval but just prints the data to observe the actual collective data results. Major concern with this approach is that the coverage results shouldn't be overriden by the other, which will be confirmed through this and also by running with a bulk of reports later
  • Loading branch information
Rd4dev committed Jul 21, 2024
1 parent 8c9800b commit d4f8015
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,12 @@ class BazelClient(private val rootDirectory: File, private val commandExecutor:
val coverageCommandOutputLines = executeBazelCommand(
"test",
"--collect_code_coverage",
"--combined_report=lcov",
bazelTestTarget,
"--instrumentation_filter=$computeInstrumentation"
)
println(File(rootDirectory,"/bazel-out/_coverage/_coverage_report.dat").exists())
println(File(rootDirectory,"/bazel-out/_coverage/_coverage_report.dat").readText())
return parseCoverageDataFilePath(coverageCommandOutputLines)?.let { path ->
File(path).readLines()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ load("//:oppia_android_test.bzl", "oppia_android_test")
oppia_android_test(
name = "MathModelTest",
srcs = ["MathModelTest.kt"],
shard_count = 4,
custom_package = "org.oppia.android.util.parser.math",
test_class = "org.oppia.android.util.parser.math.MathModelTest",
test_manifest = "//utility:test_manifest",
Expand Down

0 comments on commit d4f8015

Please sign in to comment.