Modern Apps git

← Modern-Apps.git

test: fix app/library detection and coverage totals

Commit
5bb771d0556bb71ade31dc0afba96c4dbec1d93b
Author
Vayun Mathur <[email protected]>
When
2026-11-06 05:27 UTC (1 month ago)
Parents
74d285a
is_app_module matched a comment in library/map's build file; match the plugin id instead.
The summary read the first INSTRUCTION counter (a single method); the report total is last.

Diff

test
diff --git a/test b/testindex d5c5bab9d4..ce5a287161 100755--- a/test+++ b/test@@ -81,7 +81,7 @@ all_module_dirs() {  is_app_module() {   local fs="$1"-  grep -qF 'common-conventions-app' "$ROOT/$fs/build.gradle.kts" 2>/dev/null+  grep -qF 'id("common-conventions-app")' "$ROOT/$fs/build.gradle.kts" 2>/dev/null }  module_application_id() {@@ -692,7 +692,8 @@ if [[ $RUN_UNIT -eq 1 ]]; then         echo "  $mod: no coverage data (no tests?)"         continue       fi-      line="$(grep -oE '<counter type="INSTRUCTION"[^>]*>' "$xml" 2>/dev/null | head -1 || true)"+      # report-level totals are the last counters in JaCoCo XML+      line="$(grep -oE '<counter type="INSTRUCTION"[^>]*>' "$xml" 2>/dev/null | tail -1 || true)"       missed="$(echo "$line" | sed -nE 's/.*missed="([0-9]+)".*/\1/p')"       covered="$(echo "$line" | sed -nE 's/.*covered="([0-9]+)".*/\1/p')"       if [[ -z "$missed" || -z "$covered" ]]; then