aboutsummaryrefslogtreecommitdiff
path: root/test-rig/run.sh
diff options
context:
space:
mode:
authorLena <lena@omega>2026-07-01 00:00:00 +0000
committerLena <lena@omega>2026-07-01 00:00:00 +0000
commitf6668454daaa0b5b559723b3bb685c244456247b (patch)
tree174280a1542fa4d1f5c9427b00f853458ca32022 /test-rig/run.sh
parent30ee8be82e44d1a8250d1f6e27e71f7d5f24aec5 (diff)
downloadscrcpy-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-rig/run.sh')
-rwxr-xr-xtest-rig/run.sh15
1 files changed, 8 insertions, 7 deletions
diff --git a/test-rig/run.sh b/test-rig/run.sh
index ff63c21..b55ce1e 100755
--- a/test-rig/run.sh
+++ b/test-rig/run.sh
@@ -1,6 +1,6 @@
#!/bin/sh
# In-container orchestrator. Called by ./test from outside.
-# /work/test-rig/run.sh unit|e2e|all
+# /work/test-rig/run.sh unit|e2e|all|record|screenshots|apk
#
# Expects to run inside the scrcpy-android-test docker image with
# /work mounted at the project root.
@@ -24,10 +24,11 @@ e2e() {
}
case "$cmd" in
- unit) unit ;;
- e2e) e2e ;;
- all) unit && e2e ;;
- record) /work/test-rig/record.sh ;;
- apk) /work/test-rig/build-apk.sh ;;
- *) echo "run.sh: bad cmd $cmd" >&2; exit 2 ;;
+ unit) unit ;;
+ e2e) e2e ;;
+ all) unit && e2e ;;
+ record) /work/test-rig/record.sh ;;
+ screenshots) /work/test-rig/screenshots.sh ;;
+ apk) /work/test-rig/build-apk.sh ;;
+ *) echo "run.sh: bad cmd $cmd" >&2; exit 2 ;;
esac