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
Esempio n. 2
0
    stauts = True
    try:
        ########set up
        BaseAPI().unlock()
        BaseAPI().setup()
        ###recorder sounds
        Recorbase().launch_recor_package()
        Recorbase().recorder_cycle(3)
    except Exception, msg:
        logger.debug('Exception:%s' % msg)
        stauts = False
    return stauts


##check result
try:
    main_test = main()
    check = Check_system().check_test_result('page://recorder.yunos.com')
    time.sleep(2)
    del_recor = Recorbase().delete_recorder()
    if main_test == True and check == True:
        VERDICT = SUCCESS
    else:
        VERDICT = FAILURE
except Exception, msg:
    logger.debug('Exception:%s' % msg)

###clear
finally:
    BaseAPI().exit_app()
        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
    finally:
        base.exit_app()
    return stauts


try:
    main_test = main()
    check = Check_system().check_test_result('page://videoplayer.yunos.com')
    del_video = video.delete_video_file()
    if main_test == True and check == True and del_video == True:
        VERDICT = SUCCESS
    else:
        VERDICT = FAILURE
except Exception, msg:
    logger.debug('Exception:%s' % msg)
###clear
finally:
    base.exit_app()