mirror of
git://code.qt.io/qt/qt5.git
synced 2026-03-18 02:06:20 +08:00
Fix Android emulator timeout and restart on COIN
Changed device's start timeout to 3 minutes,
and restarting retries to 3.
Changed emulator boot check loop to check against
real time value instead int value.
Some of the tests caused previous
for-loop to take more than 1 second.
Task-number: COIN-1154
Pick-to: 6.5 5.15
Change-Id: I58066ad8f440b2fdee3c5b64d094b2713007bf19
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Jukka Jokiniva <jukka.jokiniva@qt.io>
(cherry picked from commit 14c7c3061b)
Reviewed-by: Jani Korteniemi <jani.korteniemi@qt.io>
This commit is contained in:
committed by
Jukka Jokiniva
parent
be8abb4c4c
commit
3cb8fd1f10
@@ -7,8 +7,8 @@
|
||||
|
||||
set -e
|
||||
|
||||
EMULATOR_MAX_RETRIES=5
|
||||
ADB_MAX_TIMEOUT=300
|
||||
EMULATOR_MAX_RETRIES=3
|
||||
ADB_MAX_TIMEOUT=180
|
||||
EMULATOR_EXEC="$ANDROID_SDK_ROOT/emulator/emulator"
|
||||
ADB_EXEC="$ANDROID_SDK_ROOT/platform-tools/adb"
|
||||
LOGCAT_PATH="$COIN_CTEST_RESULTSDIR/emulator_logcat_%iter.txt"
|
||||
@@ -85,7 +85,11 @@ do
|
||||
|
||||
echo "Waiting a few minutes for the emulator to fully boot..."
|
||||
emulator_status=down
|
||||
for _ in $(seq ${ADB_MAX_TIMEOUT})
|
||||
|
||||
time_start=${SECONDS}
|
||||
duration=0
|
||||
|
||||
while [ $duration -lt ${ADB_MAX_TIMEOUT} ]
|
||||
do
|
||||
sleep 1
|
||||
|
||||
@@ -94,6 +98,7 @@ do
|
||||
emulator_status=up
|
||||
break
|
||||
fi
|
||||
duration=$(( SECONDS - time_start ))
|
||||
done
|
||||
|
||||
# If emulator status is still offline after timeout period,
|
||||
|
||||
Reference in New Issue
Block a user