Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4f654a1d authored by Jack He's avatar Jack He
Browse files

Add logging for waiting device to reboot

Bug: 221322550
Change-Id: I624d867f277abd6e1d6c4ef2f78e70a9e8257b32
Test: gd/cert/run
Tag: #test
parent ff91b739
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -771,12 +771,15 @@ class GdAndroidDevice(GdDeviceBase):
        # sys.boot_completed.
        while time.time() < timeout_start + timeout:
            try:
                logging.debug("waiting for device %s to turn off", self.serial_number)
                self.adb.get_state()
                logging.debug("device %s not turned off yet", self.serial_number)
                time.sleep(.1)
            except AdbError:
                # get_state will raise an error if the device is not found. We
                # want the device to be missing to prove the device has kicked
                # off the reboot.
                logging.debug("device %s is turned off, waiting for it to boot", self.serial_number)
                break
        minutes_left = timeout_minutes - (time.time() - timeout_start) / 60.0
        self.wait_for_boot_completion(timeout_minutes=minutes_left)