compose-lobsters/scripts/boot_emulator.sh
Harsh Shandilya ede879c550
github: restructure CI test setup
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
2021-03-16 15:26:58 +05:30

23 lines
672 B
Bash
Executable file

#!/usr/bin/env bash
# Creates and boots an emulator that exactly matches the one in our CI. It is recommended
# to use this as the target device for screenshot tests.
set -euxo pipefail
[ -n "${ANDROID_SDK_ROOT}" ] || { echo "ANDROID_SDK_ROOT must be set to use this script"; exit 1; }
echo no | "${ANDROID_SDK_ROOT}"/cmdline-tools/latest/bin/avdmanager create avd \
--force \
-n Pixel_XL_API_30 \
--abi 'google_apis/x86' \
--package 'system-images;android-30;google_apis;x86' \
--device 'pixel_xl'
"${ANDROID_SDK_ROOT}"/emulator/emulator \
-avd Pixel_XL_API_30 \
-no-window \
-gpu swiftshader_indirect \
-no-snapshot \
-noaudio \
-no-boot-anim