def main(): try: i = 0 while i < 5: base.unlock() base.setup() base.find_setting() BTbase().enable_bt() #Reboot the DUT,enter the Bluetooth setting base.setting_reboot_version1() newstatus =BTbase().bt() if newstatus== False: logger.debug('bluetooth is closed after reboot ') exit(1) else: BTbase().disable_bt() base.setting_reboot_version1() newstatus =BTbase().bt() if newstatus == False: logger.info('Success:bluetooth still is closed') else: logger.debug('Failed:bluetooth is opened') exit(1) logger.info('try times is %d'%i) base.exit_app() i+=1 except Exception,msg: logger.debug('Exception:%s'%msg)
def main(): stauts = True try: base.unlock() base.setup() base.find_setting() bt.disable_airplane() time.sleep(3) i = 0 while i < 50: wifi.wifi_setup() wifi.connect_wifi('YUNOS_Auto_Test_2G') base.back() bt.enable_airplane() time.sleep(10) wifi.check_connect_disable() bt.disable_airplane() time.sleep(10) wifi.check_connect_enable() base.exit_app() i += 1 logger.info('stress times is %d' % i) ########################## except Exception, msg: logger.debug('Exception:%s' % msg) stauts = False
def main(): stauts = True try: ########setup video.video_set_up('dayu.mp4') #####play video base.unlock() time.sleep(3) video.launch_video() time.sleep(1) video.check_push_video() video.play_video() time.sleep(5) video.cyclic_video() i = 0 while i < 100: time.sleep(1) base.screen_on() time.sleep(1) base.screen_on() base.unlock() i += 1 logger.info('poweroff_screen try: %d' % (i)) ########## except Exception, msg: logger.debug('Exception:%s' % msg) stauts = False
def main(): #SETUP try: base.unlock() base.setup() #Change the adapter name. base.find_setting() bt.enable_bt() bt.change_adapter_name('YUNOS') base.back() bt.disable_bt() ###########disable and enable bt base.back() bt.enable_bt() bt.check_adapter_name('text="YUNOS"') ######################### bt.start_scanner() bt.stop_scanner() bt.check_adapter_name('text="YUNOS"') time.sleep(1) bt.revert_adapter_name() except Exception, msg: logger.debug('Exception:%s' % msg)
def main(): stauts = True try: base.unlock() base.setup() camera.opencamera() camera.camera_button() time.sleep(1) camera.check_camera_size() time.sleep(2) camera.teardown() base.exit_app() ###########take one minute video camera.opencamera() camera.video_button(90) i = 0 while i <30: Command('adb -host shell input tap 623 700').start() logger.info('click the video button') time.sleep(60) Command('adb -host shell input tap 623 700').start() time.sleep(1) i+=1 # camera.check_video_size() except Exception,msg: logger.debug('FAILED:%s'%msg) stauts = False
def main(): stauts = True try: base.unlock() base.setup() wifi.wifi_setup() wifi.connect_wifi('YUNOS_Auto_Test_2G') for i in range(50): wifi.disable_wifi() time.sleep(5) wifi.enable_wifi() time.sleep(5) base.back() time.sleep(10) wifi.check_connect_enable() time.sleep(2) wifi.wlan_info() logger.info('************stress times is************ %d' % i) ########################## except Exception, msg: logger.debug('Exception:%s' % msg) stauts = False
def main(): #SETUP try: base.unlock() base.setup() #discovery and no discovery i = 0 while i < 10: base.find_setting() bt.enable_bt() time.sleep(1) bt.start_discovery() time.sleep(1) bt.disable_bt() ####### bt.enable_bt() bt.check_scanner() bt.stop_discovery() bt.disable_bt() ###### bt.enable_bt() bt.stop_discovery() base.exit_app() i += 1 except Exception, msg: logger.debug('Exception:%s' % msg)
def main(): stauts = True try: ########setup video.video_set_up('dayu.mp4') #####play video base.unlock() time.sleep(3) video.launch_video() time.sleep(1) video.check_push_video() i = 0 while i < 100: video.play_video() video.cyclic_video() time.sleep(5) base.back() time.sleep(2) i += 1 logger.info('current cycle is %d' % i) ########## except Exception, msg: logger.debug('Exception:%s' % msg) stauts = False
def main(): #SETUP try: base.unlock() base.setup() except Exception, msg: logger.debug('FAILED:%s' % msg)
def main(): try: base.unlock() base.setup() base.find_setting() BTbase().enable_bt() except Exception, msg: logger.debug('FAILED:%s' % msg)
def diconnect_check_disable(self): base.unlock() base.find_setting() Command(WIFI_Comm['LANCH_WIFI']).start() time.sleep(1) status = checkfile.check_stauts('checked="true"') if status == True: raise Exception('enable wifi status is failed') else: logger.info('enable wifi status is success')
def main(): try: base.unlock() base.setup() camera.opencamera() camera.check_video(20) check_videoformat() except Exception, msg: logger.debug('FAILED:%s' % msg)
def main(): Audiobase().audio_set_up() ####playaudio base.unlock() status = play_audio_pause_seek() if status == True: logger.info('play mp3 is succes') else: logger.debug('play mp3 is failed')
def main(): #SETUP try: base.unlock() base.setup() #enable and disable bluetooth base.find_setting() enable_disable_scan(10) except Exception, msg: logger.debug('Exception:%s' % msg)
def main(): stauts = True try: base.unlock() base.setup() wifi.wifi_setup() wifi.check_singal('text="强"') ########################## except Exception, msg: logger.debug('Exception:%s' % msg) stauts = False
def main(): stauts = True try: base.unlock() base.setup() wifi.wifi_setup() wifi.add_hidden_ssd() ########################## except Exception, msg: logger.debug('Exception:%s' % msg) stauts = False
def main(): status = True try: base.unlock() base.setup() states, out1, error = Command('adb -host shell yalloc_test_ex').start() check_result(out1) time.sleep(5) states, out2, error = Command('adb -host shell yalloc_test').start() check_result(out2) time.sleep(30) except Exception, msg: logger.debug('Exception:%s' % msg) status = False
def main(): stauts = True try: base.unlock() base.setup() wifi.wifi_setup() wifi.connect_wifi('text="YUNOS_Auto_Test_2G"') wifi.change_ipv4_stress() wifi.check_ifconfig() base.exit_app() ########################## except Exception, msg: logger.debug('Exception:%s' % msg) stauts = False
def main(): stauts = True try: base.unlock() base.setup() wifi.wifi_setup() wifi.connect_wifi('YUNOS_Auto_Test_2G') wifi.check_info() base.exit_app() ########################## except Exception, msg: logger.debug('Exception:%s' % msg) stauts = False
def main(): stauts = True try: video.video_set_up('dayu.mp4') #####play video base.unlock() time.sleep(3) video.launch_video() time.sleep(1) video.check_push_video() video.play_video() base.change_unmute_mute(3) base.exit_app() except Exception, msg: logger.debug('Exception:%s' % msg) stauts = False
def main(): stauts = True try: Audiobase().audio_set_up() ####playaudio base.unlock() Audiobase().open_audio() Audiobase().check_audio() Audiobase().play_all() finish_time = video.run_Task() if finish_time == True: Check_system().check_test_result('page://audioplayer.yunos.com') time.sleep(2) except Exception, msg: logger.debug('Exception:%s' % msg) stauts = False
def main(): #SETUP try: base.unlock() base.setup() #discovery and no discovery base.find_setting() bt.enable_bt() time.sleep(1) bt.start_discovery() time.sleep(1) bt.stop_discovery() except Exception,msg: logger.debug('Exception:%s'%msg)
def main(): stauts = True try: video.video_set_up('dayu.mp4') #####play video base.unlock() time.sleep(3) video.launch_video() time.sleep(1) video.check_push_video() video.play_video() video.pause_resume(100) base.exit_app() except Exception, msg: logger.debug('Main_Exception:%s' % msg) stauts = False
def main(): stauts = True try: base.unlock() base.setup() wifi.wifi_setup() wifi.connect_wifi('text="YUNOS_Auto_Test_2G"') wifi.swtich_ap_connect('text="YUNOS_Auto_Test_5G"') time.sleep(5) wifi.check_ap_status() base.back() wifi.disconnect_wifi('text="YUNOS_Auto_Test_5G"') ########################## except Exception,msg: logger.debug('Exception:%s'%msg) stauts = False
def main(): stauts = True try: base.unlock() base.setup() camera.opencamera() camera.camera_button() time.sleep(1) camera.check_camera_size() camera.teardown() base.exit_app() ###########take one minute video camera.opencamera() camera.video_button(60) camera.check_video_size() except Exception,msg: logger.debug('FAILED:%s'%msg) stauts = False
def main(): stauts = True try: base.unlock() base.setup() i = 0 while i < 50: wifi.wifi_setup() switch_ap() discon_wifi() i += 1 logger.info('stress times is %d' % i) ########################## except Exception, msg: logger.debug('Exception:%s' % msg) stauts = False
def main(): stauts = True try: video.video_set_up('zhoujielun.mp4', 'animal.mp4') base.unlock() ##play video with 3d high rate video video.launch_video() time.sleep(1) video.check_push_video() video.play_video_assign('text="zhoujielun"') time.sleep(60) base.back() video.play_video_assign('text="animal"') time.sleep(60) base.exit_app() except Exception, msg: logger.debug('Exception:%s' % msg) stauts = False
def main(): stauts = True try: video.video_set_up('animal.mp4') base.unlock() time.sleep(3) video.launch_video() time.sleep(1) video.check_push_video() video.play_video() time.sleep(10) video.cyclic_video() finish_time = video.run_Task() if finish_time == True: check_system.check_test_result('page://videoplayer.yunos.com') base.exit_app() except Exception, msg: logger.debug('Exception:%s' % msg) stauts = False
def main(): stauts = True try: base.unlock() base.setup() wifi.wifi_setup() wifi.disable_wifi() base.back() bt.enable_airplane() time.sleep(10) wifi.check_connect_disable() bt.disable_airplane() time.sleep(10) wifi.check_connect_disable() ########################## except Exception, msg: logger.debug('Exception:%s' % msg) stauts = False
def main(): stauts = True try: video.video_set_up('animal.mp4') base.unlock() gfx.set_up('YUNOS_Auto_Test_2G') gfx.address_4() gfx.start_address_4(50) ########## video.launch_video() time.sleep(1) video.check_push_video() video.play_video_assign('text="animal"') time.sleep(80) base.exit_app() except Exception, msg: logger.debug('Exception:%s' % msg) stauts = False