diff options
| author | Lena <lena@omega> | 2026-07-01 00:00:00 +0000 |
|---|---|---|
| committer | Lena <lena@omega> | 2026-07-01 00:00:00 +0000 |
| commit | f6668454daaa0b5b559723b3bb685c244456247b (patch) | |
| tree | 174280a1542fa4d1f5c9427b00f853458ca32022 /test | |
| parent | 30ee8be82e44d1a8250d1f6e27e71f7d5f24aec5 (diff) | |
| download | scrcpy-android-f6668454daaa0b5b559723b3bb685c244456247b.tar.gz | |
test: add a screenshot capture tier
The store screenshots were made by hand, so nothing kept them in step
with the UI. Add ./test screenshots, which boots a pixel_6 AVD on the
same image the e2e tier uses and overwrites the tracked PNGs.
The AVD is its own so a capture run cannot disturb the device state e2e
asserts against, and the panel comes from the device profile: forcing
geometry with wm size on a booted software-GPU emulator ANRs SystemUI
and the ANR dialog lands in the capture. SystemUI demo mode does the
same, so the status bar is left live. Each shot is rejected unless the
app owns the focused window and the PNG has the expected geometry.
Diffstat (limited to 'test')
| -rwxr-xr-x | test | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -7,6 +7,9 @@ # ./test all unit + e2e # ./test record boot emulator, run a Mirror session, inject events, # capture screen recording to ./output.mp4 (needs /dev/kvm) +# ./test screenshots +# boot emulator, capture the fastlane store screenshots +# into fastlane/metadata/.../phoneScreenshots (needs /dev/kvm) # ./test apk build a signed release APK with a throwaway keystore # (exercises scripts/build-apk end-to-end, no KVM) # @@ -20,7 +23,7 @@ cmd="${1:-unit}" target=unit case "$cmd" in - e2e|all|record) target=e2e ;; + e2e|all|record|screenshots) target=e2e ;; esac # The image tag is a hash of the rig inputs, so editing the Dockerfile @@ -30,14 +33,14 @@ IMG="scrcpy-android-test-$target:$(cat "$ROOT/test-rig/Dockerfile" \ | sha256sum | cut -c1-12)" case "$cmd" in - unit|e2e|all|record|apk) ;; + unit|e2e|all|record|screenshots|apk) ;; -h|--help) # Usage is the header comment block: print from line 2 down to # the first non-comment line. awk 'NR > 1 && /^#/ { sub(/^# ?/, ""); print; next } NR > 1 { exit }' "$0" >&2 exit 0 ;; *) - echo "usage: $0 [unit|e2e|all|record|apk]" >&2 + echo "usage: $0 [unit|e2e|all|record|screenshots|apk]" >&2 exit 2 ;; esac @@ -62,7 +65,7 @@ fi # KVM check for tiers that boot the emulator. needs_kvm= case "$cmd" in - e2e|all|record) needs_kvm=1 ;; + e2e|all|record|screenshots) needs_kvm=1 ;; esac kvm_args= |