def main(self, tr): kill_adb_uiautomator_block() try: system_operation.screen_on() time.sleep(1) system_operation.turn_airplane('1') system_operation.turn_bluetooth_p('0') system_operation.turn_wifi('0') system_operation.turn_gps('0') system_operation.set_display_time() except Exception: self.mobile_test.logout(self.mobile_test.my_func_name(), "Error setup load......") return False time.sleep(2) log_dir = tr.result_dir if not os.path.exists(log_dir): os.mkdir(log_dir) result = self.test_jio(log_dir) if not result: return False else: for key, velue in result.items(): tr.sub_score(key, velue) tr.result(result["rr_score"]) tr.add_attachment(log_dir + "/result.png") tr.save()
def set_settings(self): try: system_operation.set_display_time() system_operation.turn_airplane('1') system_operation.turn_bluetooth_p('0') system_operation.turn_gps('0') except Exception, e: self.video_fps_test.logout(self.video_fps_test.my_func_name(), "preload setting error: %s" % e) return False
def set_up(geek): try: system_operation.set_display_time() system_operation.turn_gps('0') system_operation.turn_wifi('0') system_operation.turn_bluetooth_p('0') system_operation.turn_airplane('1') except Exception, e: geek.logout(geek.my_func_name(), "set up error %s" % e) return False
def set_settings(self): try: system_operation.turn_airplane('1') system_operation.turn_bluetooth('0') system_operation.turn_wifi('0') system_operation.turn_gps('0') system_operation.set_display_time() return True except Exception, e: self.gallery_test.logout(self.gallery_test.my_func_name(), "preload setup failed :%s" % e) return False
def set_up(log_mes): log_mes.info(">>>>>>>>>>Set_up<<<<<<<<<<") time.sleep(2) try: system_operation.turn_wifi(0) system_operation.turn_bluetooth(0) system_operation.turn_gps(0) system_operation.turn_airplane(1) system_operation.set_display_time() except Exception, e: log_mes.error("excption error :%s" % e) return False
def main(tr, panning_fps_test, panning_test): kill_adb_uiautomator_block() try: system_operation.turn_airplane('1') system_operation.turn_bluetooth('0') system_operation.turn_wifi('1') system_operation.turn_gps('0') system_operation.set_display_time() except Exception, e: panning_test.log.error("exception error :%s !!!!" % e) return False
def main(self, tr): kill_adb_uiautomator_block() system_operation.screen_on() time.sleep(1) try: system_operation.turn_airplane('1') system_operation.turn_bluetooth('0') system_operation.turn_wifi('0') system_operation.turn_gps('0') system_operation.set_display_time() except Exception, e: self.mobile_test.logout(self.mobile_test.my_func_name(), "preload setup is error %s" % e) return False
def main(rl, tr): rl.logout(rl.my_func_name(), '...') kill_adb_uiautomator_block() try: system_operation.turn_airplane('1') system_operation.turn_bluetooth('0') system_operation.turn_wifi('0') system_operation.turn_gps('0') system_operation.set_display_time() except Exception, e: rl.logout(rl.my_func_name(), "Setup Failure. %s" % e) return False
def main(self, tr): os.system("adb root") self.clear_data() system_operation.screen_on() time.sleep(1) try: system_operation.turn_airplane('1') system_operation.turn_bluetooth_p('0') system_operation.turn_wifi('0') system_operation.turn_gps('0') system_operation.set_display_time() except Exception, e: self.mobile_test.logout(self.mobile_test.my_func_name(), "failed %s" % e) return False
def main(andebench, timeout=80): tr = TestResult(sys.argv) log_dir = tr.result_dir if not os.path.exists(log_dir): os.mkdir(log_dir) try: system_operation.turn_gps('0') system_operation.turn_wifi('0') system_operation.turn_bluetooth('0') system_operation.turn_airplane('1') system_operation.set_display_time() clear_all(andebench) except Exception, e: andebench.logout(andebench.my_func_name(), "Setup Failure. %s" % e) return False
def set_settings(zooming_test): zooming_test.logout(zooming_test.my_func_name(), ">>>>>>Set config<<<<<<") kill_adb_uiautomator_block_old() try: system_operation.turn_airplane('1') system_operation.modify_wifi() system_operation.turn_bluetooth('0') system_operation.turn_gps('1') system_operation.set_display_time() time.sleep(2) kill_adb_uiautomator_block_old() zooming_test.ui_operation.click_by_event("HOME") time.sleep(1) except Exception, e: zooming_test.logout(zooming_test.my_func_name(), "preload setup failed :%s" % e) return False
def main(tr): kill_adb_uiautomator_block_old() if dmark.command_timeout("adb wait-for-device", timeout=10): os.system("adb root") time.sleep(1) system_operation.screen_on() time.sleep(1) try: system_operation.turn_airplane('1') system_operation.turn_bluetooth('0') system_operation.turn_wifi('0') system_operation.turn_gps('0') system_operation.set_display_time() except Exception, e: dmark.logout(dmark.my_func_name(), 'preload failse %s' % e) return False time.sleep(2) log_dir = os.path.join(tr.result_dir) if not os.path.exists(log_dir): os.mkdir(log_dir) results = run_test(log_dir, tr) if not results: return False d_result = { 'total_score': results[0], 'physics_test': results[1], 'physics_score': results[2], 'graphics_score': results[3], 'graphics_test1': results[4], 'g raphics_test2': results[5] } rj = open("%sresult.json" % log_dir, 'w+') cpu_watt = dmark.ui_operation.watt_operate.get_watt_average() if not cpu_watt == False: d_result['cpu_watt'] = cpu_watt rj.write(json.dumps(d_result)) rj.close()
def main(self): kill_adb_uiautomator_block() self.mobile_test.check_system_app_package("glbenchmark27.corporate") system_operation.screen_on() time.sleep(1) try: system_operation.turn_airplane('1') system_operation.turn_bluetooth('0') system_operation.turn_wifi('0') system_operation.turn_gps('0') system_operation.set_display_time() except Exception: return False time.sleep(2) result = self.run_test() if not result: return False self.mobile_test.logout(self.mobile_test.my_func_name(), "Test result is : %s" % result) self.result = result return True