Files
saphid--frame-control/tests/fakeframe/host/entrypoint.sh
T
saphidandClaude Opus 5.5 0181071b83 Tests against a fake Frame, and a headset smoke test
tests/fakeframe: a container that stands in for the Frame (Arch Linux, or
Arch Linux ARM on arm64) with sshd, rsync, Valve's steamos-devkit-service
and hooks (vendored unmodified), a fake Steam client for the devkit pipe and
the DevTools port (the app's JavaScript runs in Node against stand-in
SteamClient/appStore objects), stubs for steam, wpctl, flatpak, podman,
Lepton and friends, battery and thermal files under /sys, and fault
switches (fakeframe-ctl): pairing mode, approve/deny/timeout, Steam not
running, headset asleep, sshd off, disk full, runtimes missing. A second
container is the computer running Frame Control.

tests/e2e: 29 tests driving the real ui/server.py, frame_connect.py and
frame_titles.py against it; skipped unless FRAME_E2E=1. scripts/e2e.sh
builds, runs and tears down; CI runs it on ubuntu-24.04-arm.

tests/smoke + scripts/frame-smoke.sh: the core cases against a real Frame,
recorded with its BUILD_ID, cleaning up after itself; --pair to pair a
throwaway key. docs/testing.md describes the layers.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-27 17:40:09 +10:00

26 lines
850 B
Bash
Executable File

#!/bin/bash
# The computer side of the harness: tester's ~/.ssh as Frame Control's setup
# leaves it (ui/frame_connect.py's own config block), pointing `frame` at the
# fake Frame, with the harness key the fake trusts.
set -euo pipefail
host=${FAKEFRAME_HOST:-fakeframe}
for _ in $(seq 1 240); do
[ -s /keys/id_ed25519_frame.pub ] && break
sleep 0.5
done
mkdir -p -m 700 ~/.ssh
install -m 600 /keys/id_ed25519_frame ~/.ssh/id_ed25519_frame
install -m 644 /keys/id_ed25519_frame.pub ~/.ssh/id_ed25519_frame.pub
python3 - "$host" > ~/.ssh/config <<'PY'
import sys
sys.path.insert(0, '/repo/ui')
import frame_connect
print('\n'.join(frame_connect.config_block(sys.argv[1])))
PY
chmod 600 ~/.ssh/config
until ssh-keyscan -T 2 "$host" > ~/.ssh/known_hosts 2>/dev/null && [ -s ~/.ssh/known_hosts ]; do
sleep 1
done
touch ~/.ready
exec sleep infinity