mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-01-19 04:21:17 +00:00
Gem5AndroidDevice: No longer wait for disabled boot animation
Adjust the wait_for_boot method of Gem5AndroidDevice to no longer wait for the boot animation to finish if the animation has been disabled. The service.bootanim.exit property is only set (to 0) when the animation starts, and is set to 1 when the animation finishes. If the animation never starts, then the property is not set at all. Hence, we assume the boot animation has finished, unless the property has been set.
This commit is contained in:
parent
e7c75b2d3b
commit
cc9b00673e
@ -93,15 +93,27 @@ class Gem5AndroidDevice(BaseGem5Device, AndroidDevice):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
def wait_for_boot(self):
|
def wait_for_boot(self):
|
||||||
|
"""
|
||||||
|
Wait for the system to boot
|
||||||
|
|
||||||
|
We monitor the sys.boot_completed and service.bootanim.exit system
|
||||||
|
properties to determine when the system has finished booting. In the
|
||||||
|
event that we cannot coerce the result of service.bootanim.exit to an
|
||||||
|
integer, we assume that the boot animation was disabled and do not wait
|
||||||
|
for it to finish.
|
||||||
|
|
||||||
|
"""
|
||||||
self.logger.info("Waiting for Android to boot...")
|
self.logger.info("Waiting for Android to boot...")
|
||||||
while True:
|
while True:
|
||||||
|
booted = False
|
||||||
|
anim_finished = True # Assume boot animation was disabled on except
|
||||||
try:
|
try:
|
||||||
booted = (int('0' + self.gem5_shell('getprop sys.boot_completed', check_exit_code=False)) == 1)
|
booted = (int('0' + self.gem5_shell('getprop sys.boot_completed', check_exit_code=False).strip()) == 1)
|
||||||
anim_finished = (int('0' + self.gem5_shell('getprop service.bootanim.exit', check_exit_code=False)) == 1)
|
anim_finished = (int(self.gem5_shell('getprop service.bootanim.exit', check_exit_code=False).strip()) == 1)
|
||||||
if booted and anim_finished:
|
except ValueError:
|
||||||
break
|
|
||||||
except (DeviceError, ValueError):
|
|
||||||
pass
|
pass
|
||||||
|
if booted and anim_finished:
|
||||||
|
break
|
||||||
time.sleep(60)
|
time.sleep(60)
|
||||||
|
|
||||||
self.logger.info("Android booted")
|
self.logger.info("Android booted")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user