Exemple #1
0
    def check_condition(self):
        wait_time = 0
        while self.serial not in local_utils.get_fastboot_devices() and\
              wait_time < self.timeout:
            time.sleep(2)
            wait_time += 2

        return self.serial in local_utils.get_fastboot_devices()
Exemple #2
0
    for line in info:
        line = line.strip("\r\n")
        line = line.split()
        if "FAILED" == line[0]:
            result = False
    r.close()

    os.system("rm -rf ./tmp")

    fastboot_steps.continue_to_adb(serial = serial)()

    if result:
        raise Exception("The test result did not achieve the desired results")

except:
    raise

finally:
    if serial in local_utils.get_fastboot_devices():
        fastboot_steps.continue_to_adb(serial = serial)()

    relay_steps.reboot_main_os(serial=serial,
                               relay_type = relay_type,
                               relay_port = relay_port,
                               power_port = power_port,
                               wait_ui = wait_ui,
                               timeout = 300,
                               delay_power_on = 30,
                               device_info = "broxtonp")()

# test end #