@@ -29,14 +29,6 @@ ANDROID_SDK_TRIPLE="x86_64-unknown-linux-android28"
2929
3030while [[ $# -gt 0 ]]; do
3131 case $1 in
32- --android)
33- INSTALL_ANDROID=true
34- shift
35- ;;
36- --android-ndk-version=* )
37- ANDROID_NDK_VERSION=" ${1#* =} "
38- shift
39- ;;
4032 --android-sdk-triple=* )
4133 ANDROID_SDK_TRIPLE=" ${1#* =} "
4234 shift
@@ -81,34 +73,21 @@ sdkmanager --install "emulator" "platform-tools" "platforms;android-${ANDROID_AP
8173
8274log " Creating Android emulator"
8375avdmanager create avd --force -n " ${EMULATOR_NAME} " --package " ${EMULATOR_SPEC} " --device " ${ANDROID_PROFILE} "
84- echo " Searching for emulator in: ${ANDROID_AVD_HOME} "
85- find " ${ANDROID_AVD_HOME} " || true
86- echo " Searching for emulator in: /"
87- find / | grep " ${EMULATOR_NAME} " || true
8876
8977log " Configuring Android emulators"
9078emulator -list-avds
9179
92- ANDROID_AVD_CONFIG=" ${ANDROID_AVD_HOME} " /" ${EMULATOR_NAME} " .avd/config.ini
93- # mkdir -p $(dirname "${ANDROID_AVD_CONFIG}")
94- # ~2G partition size
95- echo ' disk.dataPartition.size=2GB' >> " ${ANDROID_AVD_CONFIG} "
96- log " Checking Android emulator"
97- cat " ${ANDROID_AVD_CONFIG} "
98-
9980log " Check Hardware Acceleration (KVM)"
10081emulator -accel-check
10182
10283log " Starting Android emulator"
103-
10484# launch the emulator in the background
10585nohup emulator -no-metrics -partition-size 1024 -memory 4096 -wipe-data -no-window -no-snapshot -noaudio -no-boot-anim -avd " ${EMULATOR_NAME} " &
10686
10787log " Waiting for Android emulator startup"
10888timeout ${ANDROID_EMULATOR_LAUNCH_TIMEOUT} adb wait-for-any-device
10989
11090log " Prepare Swift test package"
111-
11291# create a staging folder where we copy the test executable
11392# and all the dependent libraries to copy over to the emulator
11493STAGING_DIR=" swift-android-test"
0 commit comments