diff options
Diffstat (limited to 'test')
| -rwxr-xr-x | test | 14 |
1 files changed, 11 insertions, 3 deletions
@@ -16,11 +16,19 @@ set -eu ROOT="$(cd "$(dirname "$0")" && pwd)" +cmd="${1:-unit}" + +target=unit +case "$cmd" in + e2e|all|record) target=e2e ;; +esac + # The image tag is a hash of the rig inputs, so editing the Dockerfile # or the SDK package list automatically invalidates the cached image. -IMG="scrcpy-android-test:$(cat "$ROOT/test-rig/Dockerfile" "$ROOT/test-rig/sdk-packages.txt" | sha256sum | cut -c1-12)" +IMG="scrcpy-android-test-$target:$(cat "$ROOT/test-rig/Dockerfile" \ + "$ROOT/test-rig/sdk-packages.txt" "$ROOT/test-rig/sdk-packages-e2e.txt" \ + | sha256sum | cut -c1-12)" -cmd="${1:-unit}" case "$cmd" in unit|e2e|all|record|apk) ;; -h|--help) @@ -48,7 +56,7 @@ if ! docker image inspect "$IMG" >/dev/null 2>&1; then echo " Build will likely fail. Fix the host DNS (e.g." >&2 echo " append 'nameserver 1.1.1.1' to /etc/resolv.conf) and retry." >&2 fi - docker build --network=host -t "$IMG" "$ROOT/test-rig" + docker build --network=host --target "$target" -t "$IMG" "$ROOT/test-rig" fi # KVM check for tiers that boot the emulator. |