Skip to content

Commit 7c4555a

Browse files
committed
Fix screenshot comparison comment generation
1 parent ff4c140 commit 7c4555a

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

scripts/run-android-instrumentation-tests.sh

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ SUMMARY_FILE="$SCREENSHOT_TMP_DIR/screenshot-summary.txt"
435435
COMMENT_FILE="$SCREENSHOT_TMP_DIR/screenshot-comment.md"
436436

437437
ra_log "STAGE:COMMENT_BUILD -> Rendering summary and PR comment markdown"
438-
python3 <<'PY' "$COMPARE_JSON" "$COMMENT_FILE" "$SUMMARY_FILE"
438+
python3 - "$COMPARE_JSON" "$COMMENT_FILE" "$SUMMARY_FILE" <<'PY'
439439
import json
440440
import pathlib
441441
import sys
@@ -592,6 +592,18 @@ else:
592592
comment_path.write_text("", encoding="utf-8")
593593
PY
594594

595+
if [ -s "$SUMMARY_FILE" ]; then
596+
ra_log " -> Wrote summary entries to $SUMMARY_FILE ($(wc -l < "$SUMMARY_FILE" 2>/dev/null || echo 0) line(s))"
597+
else
598+
ra_log " -> No summary entries generated (all screenshots matched stored baselines)"
599+
fi
600+
601+
if [ -s "$COMMENT_FILE" ]; then
602+
ra_log " -> Prepared PR comment payload at $COMMENT_FILE (bytes=$(wc -c < "$COMMENT_FILE" 2>/dev/null || echo 0))"
603+
else
604+
ra_log " -> No PR comment content produced"
605+
fi
606+
595607
if [ -s "$SUMMARY_FILE" ]; then
596608
while IFS='|' read -r status test message copy_flag path preview_note; do
597609
[ -n "${test:-}" ] || continue

0 commit comments

Comments
 (0)