Skip to content

Commit 9317f4c

Browse files
committed
Fix AVD creation failure in instrumentation runner
1 parent a279152 commit 9317f4c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

scripts/run-android-instrumentation-tests.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,10 @@ fi
131131
AVD_NAME="cn1-api35-arm"
132132
if ! "$AVDMANAGER" list avd | grep -q "Name: $AVD_NAME"; then
133133
log "Creating AVD $AVD_NAME"
134-
printf 'no\n' | "$AVDMANAGER" create avd -n "$AVD_NAME" -k "system-images;android-35;google_apis;arm64-v8a" -d pixel >/dev/null
134+
if ! printf 'no\n' | "$AVDMANAGER" create avd -n "$AVD_NAME" -k "system-images;android-35;google_apis;arm64-v8a" -d pixel >/dev/null 2>&1; then
135+
log "Failed to create AVD $AVD_NAME" >&2
136+
exit 1
137+
fi
135138
fi
136139

137140
log "Starting AVD $AVD_NAME in headless mode"

0 commit comments

Comments
 (0)