mirror of
git://code.qt.io/qt/qt5.git
synced 2025-12-24 08:56:16 +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 Change-Id: I58066ad8f440b2fdee3c5b64d094b2713007bf19 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> Reviewed-by: Jukka Jokiniva <jukka.jokiniva@qt.io>
This commit is contained in:
@@ -7,8 +7,8 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
EMULATOR_MAX_RETRIES=5
|
EMULATOR_MAX_RETRIES=3
|
||||||
ADB_MAX_TIMEOUT=300
|
ADB_MAX_TIMEOUT=180
|
||||||
EMULATOR_EXEC="$ANDROID_SDK_ROOT/emulator/emulator"
|
EMULATOR_EXEC="$ANDROID_SDK_ROOT/emulator/emulator"
|
||||||
ADB_EXEC="$ANDROID_SDK_ROOT/platform-tools/adb"
|
ADB_EXEC="$ANDROID_SDK_ROOT/platform-tools/adb"
|
||||||
LOGCAT_PATH="$COIN_CTEST_RESULTSDIR/emulator_logcat_%iter.txt"
|
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..."
|
echo "Waiting a few minutes for the emulator to fully boot..."
|
||||||
emulator_status=down
|
emulator_status=down
|
||||||
for _ in $(seq ${ADB_MAX_TIMEOUT})
|
|
||||||
|
time_start=${SECONDS}
|
||||||
|
duration=0
|
||||||
|
|
||||||
|
while [ $duration -lt ${ADB_MAX_TIMEOUT} ]
|
||||||
do
|
do
|
||||||
sleep 1
|
sleep 1
|
||||||
|
|
||||||
@@ -94,6 +98,7 @@ do
|
|||||||
emulator_status=up
|
emulator_status=up
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
|
duration=$(( SECONDS - time_start ))
|
||||||
done
|
done
|
||||||
|
|
||||||
# If emulator status is still offline after timeout period,
|
# If emulator status is still offline after timeout period,
|
||||||
|
|||||||
Reference in New Issue
Block a user