Skip to content

Commit 345a468

Browse files
committed
Use x86_64-linux-android for test cases
1 parent 1c088a2 commit 345a468

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

.github/workflows/scripts/android/android-emulator-tests.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,11 @@ fatal() { error "$@"; exit 1; }
1919

2020
ANDROID_API=28
2121
ANDROID_EMULATOR_ARCH="x86_64"
22+
# x86_64=x86_64, armv7=arm
23+
ANDROID_EMULATOR_ARCH_TRIPLE="${ANDROID_EMULATOR_ARCH}"
2224
EMULATOR_SPEC="system-images;android-${ANDROID_API};default;${ANDROID_EMULATOR_ARCH}"
2325
EMULATOR_NAME="swiftemu"
2426
ANDROID_PROFILE="Nexus 10"
25-
ANDROID_EMULATOR_ARCH_TRIPLE="x86_64-linux-android"
2627
ANDROID_EMULATOR_LAUNCH_TIMEOUT=300
2728

2829
# FIXME: pass this in with an argument
@@ -100,6 +101,11 @@ log "Installing Android emulator"
100101
sdkmanager --install "${EMULATOR_SPEC}" "emulator" "platform-tools" "platforms;android-${ANDROID_API}"
101102

102103
log "Creating Android emulator"
104+
ANDROID_AVD_CONFIG="${ANDROID_AVD_HOME}"/"${EMULATOR_NAME}".avd/config.ini
105+
mkdir -p "$(dirname ${ANDROID_AVD_CONFIG})"
106+
echo '' > "${ANDROID_AVD_CONFIG}"
107+
# ~2G partition side
108+
echo 'disk.dataPartition.size=2000000000' > "${ANDROID_AVD_CONFIG}"
103109
avdmanager create avd -n "${EMULATOR_NAME}" -k "${EMULATOR_SPEC}" --device "${ANDROID_PROFILE}"
104110

105111
log "Listing Android emulators"
@@ -119,6 +125,7 @@ log "Show Disk Space"
119125
df -h
120126

121127
log "Starting Android emulator"
128+
122129
# launch the emulator in the background; we will cat the logs at the end
123130
# TODO: -no-accel disables the need for KVM, but is very slow
124131
nohup emulator -no-accel -no-metrics -partition-size 1024 -memory 4096 -avd "${EMULATOR_NAME}" -wipe-data -no-window -no-snapshot -noaudio -no-boot-anim &

0 commit comments

Comments
 (0)