commit | d0545519654fe636afee417e48961d562467ae82 | [log] [tgz] |
---|---|---|
author | Godofredo Contreras <godofredoc@google.com> | Mon Feb 05 23:19:21 2024 +0000 |
committer | CQ Bot Account <flutter-scoped@luci-project-accounts.iam.gserviceaccount.com> | Mon Feb 05 23:19:21 2024 +0000 |
tree | e2ff13764e65c9609e349d0bd93794dc3d8c3cdd | |
parent | 3e0fa28c914363f0c5792f6531bbfa2ae5fef592 [diff] |
Fix fail fast logic on avd_setup. There were several issues with the logic to handle the retry attempts. Change-Id: I8dbaeb7fea521ead2dd87cfb1c0882eff7eee6f9 Reviewed-on: https://flutter-review.googlesource.com/c/recipes/+/54860 Reviewed-by: Ricardo Amador <ricardoamador@google.com> Reviewed-by: Keyong Han <keyonghan@google.com> Commit-Queue: Godofredo Contreras <godofredoc@google.com>
diff --git a/recipe_modules/android_virtual_device/resources/avd_setup.sh b/recipe_modules/android_virtual_device/resources/avd_setup.sh index 1ced355..278e5e3 100644 --- a/recipe_modules/android_virtual_device/resources/avd_setup.sh +++ b/recipe_modules/android_virtual_device/resources/avd_setup.sh
@@ -69,8 +69,8 @@ local remaining_attempts=20 until adb shell true do - remaining_attemps = remaining_attemps - 1 - if (( remaining_attempts <= 0 )) + ((remaining_attempts--)) + if [[ remaining_attempts -le 0 ]] then echo "Emulator not found" exit 1