blob: ff63c21d91b2153e7ce6b112af9c755fae6e600d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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
|