Playtest build: a separate app with an adb-only file player for AVI and frame-rate tests
tv.orbit.classic.playtest has its own data and Orbit's own screens switched off, so it can't reach the household's schedules, Taste or Continue watching. It plays only the ten approved clips (checked by SHA-256) through Orbit's own player set-up, container rule and frame-rate matcher, with each switch set per run. Each run covers seeking, reopening (recovery), one retry on error, and the no-decoder case. verify.sh now fails if the hook ever reaches the release APK. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Executable
+24
@@ -0,0 +1,24 @@
|
||||
#!/usr/bin/env bash
|
||||
# The AVI and frame-rate test matrix (9 November 2026), on one TV, with the separate playtest app (tv.orbit.classic.playtest).
|
||||
# Orbit itself is never opened, changed or stopped; its schedules, Taste and Continue watching live in another app.
|
||||
# tools/playtest-run.sh <adb-device> (needs the playtest app installed: apks/orbit-playtest-0.123.0.apk)
|
||||
# Each of the 10 approved clips runs with its switch off and then on (20 runs, about 35 s each). Results are pulled to
|
||||
# audits/playtest-<date>/ with one summary line per run.
|
||||
set -uo pipefail
|
||||
A=${ADB:-/opt/android-sdk/platform-tools/adb}; D=$1; MEDIA=${PLAYTEST_MEDIA:-/home/pauljd/Documents/OrbitTV/player-test-media}
|
||||
OUT=/home/pauljd/Documents/OrbitTV/audits/playtest-$(date +%Y%m%d-%H%M); mkdir -p "$OUT"
|
||||
DIR=/sdcard/Android/data/tv.orbit.classic.playtest/files/playtest
|
||||
$A -s $D shell pm path tv.orbit.classic.playtest >/dev/null || { echo "The playtest app isn't installed on $D."; exit 1; }
|
||||
$A -s $D shell am start -W -n tv.orbit.classic.playtest/tv.orbit.classic.PlaytestFileActivity --es file none >/dev/null; sleep 5 # makes its folder
|
||||
for f in "$MEDIA"/fps-*.mkv "$MEDIA"/avi-*.avi; do $A -s $D push "$f" "$DIR/" >/dev/null; done
|
||||
for f in "$MEDIA"/fps-*.mkv "$MEDIA"/avi-*.avi; do
|
||||
n=$(basename "$f"); sw=$([[ $n == avi-* ]] && echo avi || echo frame_rate)
|
||||
for state in off on; do
|
||||
$A -s $D shell am start -W -n tv.orbit.classic.playtest/tv.orbit.classic.PlaytestFileActivity --es file "$n" --es $sw $state >/dev/null
|
||||
sleep 33
|
||||
$A -s $D pull "$DIR/results/$n.json" "$OUT/${n%.*}-$sw-$state.json" >/dev/null 2>&1
|
||||
python3 -c "import json,sys; r=json.load(open(sys.argv[1])); v=r.get('video',{}); print(f\"{sys.argv[2]:<28} {r.get('outcome')}; fps {v.get('fps')}; decoder {v.get('decoder')}; mode {r.get('modeBefore')} > {r.get('modeDuring')} > {r.get('modeAfter')}; first frame {r.get('firstFrameMs')} ms; recovered {r.get('recoveredMs')} ms; stalls {r.get('stalls')}; errors {r.get('errors')}\")" "$OUT/${n%.*}-$sw-$state.json" "$n $sw=$state" 2>/dev/null | tee -a "$OUT/summary.txt" || echo "$n $sw=$state: no result" | tee -a "$OUT/summary.txt"
|
||||
done
|
||||
done
|
||||
$A -s $D shell rm -r "$DIR" >/dev/null
|
||||
echo "Results: $OUT"
|
||||
@@ -23,5 +23,8 @@ lint = len(re.findall(r'severity="(Error|Fatal)"', open('app/build/reports/lint-
|
||||
print(f"tests {tests}, failures {fails}, lint errors {lint}, contract suite {'present' if contract else 'MISSING'}")
|
||||
sys.exit(0 if fails == 0 and lint == 0 and contract and tests > 0 else 1)
|
||||
PY
|
||||
# The playback test hook is only ever in the playtest build (Paul, 9 November 2026): never in the release APK.
|
||||
if unzip -l app/build/outputs/apk/release/app-release.apk | grep -q playtest-approved || \
|
||||
unzip -p app/build/outputs/apk/release/app-release.apk 'classes*.dex' | grep -aq PlaytestFileActivity; then echo "Release APK contains the playback test hook."; exit 1; fi
|
||||
sha256sum app/build/outputs/apk/release/app-release.apk | cut -c1-64
|
||||
echo "Release gate passed."
|
||||
|
||||
Reference in New Issue
Block a user