aboutsummaryrefslogtreecommitdiff
path: root/test-rig/run.sh
diff options
context:
space:
mode:
authorLena <lena@omega>2026-01-01 00:00:00 +0000
committerLena <lena@omega>2026-06-24 22:14:50 +0300
commiteb0c8951196c637e44daf3c0617b131b997d5d2c (patch)
tree2f83b6a41cee745467e53fc401942b82cea286ea /test-rig/run.sh
downloadscrcpy-android-0.1.tar.gz
scrcpy-android: mirror an Android device over wireless ADB0.1
Native Java app for Android 12+ that mirrors another Android device over wireless ADB, forwarding video, audio, touch input, and clipboard. Bundles a pinned scrcpy-server.jar and the vendored libadb-android stack. Supports h264/h265/av1 video and raw/opus audio with in-app codec selection. No NDK, no Kotlin. Includes JVM unit tests and a Docker-based emulator e2e rig.
Diffstat (limited to 'test-rig/run.sh')
-rwxr-xr-xtest-rig/run.sh33
1 files changed, 33 insertions, 0 deletions
diff --git a/test-rig/run.sh b/test-rig/run.sh
new file mode 100755
index 0000000..ff63c21
--- /dev/null
+++ b/test-rig/run.sh
@@ -0,0 +1,33 @@
+#!/bin/sh
+# In-container orchestrator. Called by ./test from outside.
+# /work/test-rig/run.sh unit|e2e|all
+#
+# Expects to run inside the scrcpy-android-test docker image with
+# /work mounted at the project root.
+
+set -eu
+
+cmd="${1:-unit}"
+
+mkdir -p /work/.tools/home /work/.tools/gradle-home /work/.tools/avd
+export HOME="/work/.tools/home"
+export GRADLE_USER_HOME="/work/.tools/gradle-home"
+export ANDROID_AVD_HOME="/work/.tools/avd"
+
+unit() {
+ echo "test: gradle :app:test"
+ /work/gradlew --no-daemon -q :app:test
+}
+
+e2e() {
+ /work/test-rig/e2e.sh
+}
+
+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 ;;
+esac