Exemplo n.º 1
0
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():
    #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:
        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():
    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)
Exemplo n.º 5
0
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:
        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
Exemplo n.º 7
0
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 main():
    try:
        base.unlock()
        base.setup()
        camera.opencamera()
        camera.check_video(20)
        check_videoformat()

    except Exception, msg:
        logger.debug('FAILED:%s' % msg)
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.add_hidden_ssd()

##########################

    except Exception, msg:
        logger.debug('Exception:%s' % msg)
        stauts = False
Exemplo n.º 12
0
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
Exemplo n.º 13
0
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():
#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)
Exemplo n.º 17
0
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
Exemplo n.º 18
0
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:
        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()
        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:
        base.unlock()
        base.setup()
        i = 0
        while i < 50:
            wifi.wifi_setup()
            wifi.connect_wifi('YUNOS_Auto_Test_2G')
            base.back()
            wifi.disconnect_wifi('YUNOS_Auto_Test_2G')
            base.exit_app()
            i += 1
            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()

        base.find_setting()
        bt.enable_bt()
        time.sleep(1)
        i = 0
        while i < 30:
            bt.start_scanner()
            time.sleep(3)
            bt.stop_scanner()
            time.sleep(3)
            logger.info('try time is %d' % i)
            i += 1
    except Exception, msg:
        logger.debug('Exception:%s' % msg)
Exemplo n.º 23
0
def main():
#SETUP
    try:
        base.unlock()
        base.setup()

#discovery and no discovery

        base.find_setting()
        bt.enable_bt()
        time.sleep(1)
        for i in range(10):
            bt.start_discovery()
            time.sleep(1)
            bt.stop_discovery()
            time.sleep(1)
        time.sleep(50)
        bt.devices_discovery('resource-id')
    except Exception,msg:
        logger.debug('Exception:%s'%msg)
Exemplo n.º 24
0
def main():
    stauts = True
    try:
        base.unlock()
        base.setup()
        wifi.wifi_setup()
        base.reboot_version1()
        base.unlock()

        wifi.diconnect_check_enable()
        wifi.disable_wifi()
        base.reboot_version1()
        base.unlock()
        wifi.diconnect_check_disable()
        base.exit_app()

      ##########################

    except Exception,msg:
        logger.debug('Exception:%s'%msg)
        stauts = False
def main():
    stauts = True
    try:
        base.unlock()
        base.setup()
        base.find_setting()
        bt.disable_airplane()
        time.sleep(3)
        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()
      ##########################

    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()
        bt.start_scanner()
        time.sleep(1)
        i = 0
        while i < 30:
            bt.start_discovery()
            time.sleep(1)
            bt.stop_discovery()
            time.sleep(1)
            i += 1
            logger.info('try times is %d' % i)

    except Exception, msg:
        logger.debug('Exception:%s' % msg)
Exemplo n.º 27
0
def set_up():
    base.unlock()
    base.setup()
    base.back()
Exemplo n.º 28
0
 def set_up(self,args):
     base.unlock()
     base.setup()
     wifi.launch_wifi()
     wifi.connect_wifi(args)
     base.exit_app()
Exemplo n.º 29
0
def set_up():
    base.screen_on()
    base.unlock()
    base.setup()
    base.back()