scripts: return to monke

I don't like bash but turns out I dislike Python more

This reverts commit 2628bfc2cd, d77fa13903 and 69f63cced4.
This commit is contained in:
Harsh Shandilya 2023-08-10 02:58:08 +05:30
parent 892d68581d
commit 591c68a6e4
No known key found for this signature in database
8 changed files with 90 additions and 218 deletions

28
scripts/boot-emulator.sh Executable file
View file

@ -0,0 +1,28 @@
#!/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 -euo pipefail
[ -n "${ANDROID_HOME:-}" ] || {
echo "ANDROID_HOME must be set to use this script"
exit 1
}
[ -n "${ANDROID_API_LEVEL:-}" ] || { echo "ANDROID_API_LEVEL not defined; defaulting to 33"; }
API_LEVEL="${ANDROID_API_LEVEL:-33}"
sdkmanager "system-images;android-${API_LEVEL};google_apis;x86_64"
echo no | "${ANDROID_HOME}"/cmdline-tools/latest/bin/avdmanager create avd \
--force \
-n "Pixel_XL_API_${API_LEVEL}" \
--abi 'google_apis/x86_64' \
--package "system-images;android-${API_LEVEL};google_apis;x86_64" \
--device 'pixel_xl'
"${ANDROID_HOME}"/emulator/emulator \
-avd "Pixel_XL_API_${API_LEVEL}" \
-gpu 'swiftshader_indirect' \
-noaudio