From 5ea0739dfe700e072e521a04deedbf3dada9f3a6 Mon Sep 17 00:00:00 2001 From: Rd Date: Mon, 22 Jul 2024 02:55:50 +0530 Subject: [PATCH] Re run attempt 10; Printing the coverage command run with bazel test --collect_code_coverage output to view shard coverage data --- .../java/org/oppia/android/scripts/common/BazelClient.kt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/src/java/org/oppia/android/scripts/common/BazelClient.kt b/scripts/src/java/org/oppia/android/scripts/common/BazelClient.kt index 0bb44640bcd..8e276a84d54 100644 --- a/scripts/src/java/org/oppia/android/scripts/common/BazelClient.kt +++ b/scripts/src/java/org/oppia/android/scripts/common/BazelClient.kt @@ -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")