From c89250698116180acfe9a98c24e2e5291e050240 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 21 Sep 2026 19:40:45 +0000 Subject: gradle-report: a missing report is a failure, not a pass The lint path was wrong -- AGP writes to app/build/reports/, not app/build/ -- and the script fell back to the gradle exit code, printing 'report: MISSING ... result: PASS'. A checker that cannot find what it is meant to check and passes anyway is precisely the failure these wrappers exist to prevent, and it hid real lint errors in Listen for one run. Now locates the report rather than assuming a path, and a missing report fails while saying the check did not actually inspect anything. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_018AwnALZL6bD4VBtATDVv3B --- test/run-tests.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'test/run-tests.sh') diff --git a/test/run-tests.sh b/test/run-tests.sh index 0e655d0..1c75cd7 100755 --- a/test/run-tests.sh +++ b/test/run-tests.sh @@ -219,6 +219,17 @@ fi out=$("$BIN/gradle-report" "$tmproot/nope" detekt 2>&1); rc=$? if [ $rc -eq 2 ]; then ok "missing project dir is fatal"; else bad "missing dir" "rc=$rc"; fi +# A missing report must fail, not fall through to the exit code. A hardcoded path that stops +# resolving would otherwise report PASS forever while inspecting nothing. +d="$tmproot/report-noreport" +make_project "$d" 0 +out=$("$BIN/gradle-report" "$d" detekt 2>&1); rc=$? +if [ $rc -ne 0 ] && printf '%s' "$out" | grep -qi "did NOT inspect"; then + ok "a missing report fails instead of passing on exit code" +else + bad "missing report" "rc=$rc out=$out" +fi + printf '=== android-ui ===\n' # 16. Usage validation without a device. -- cgit v1.2.3