def main():
    print CUR_DIR
    if not os.path.exists(os.path.join(CUR_DIR, './' + out_dir + '/')):
        os.mkdir(os.path.join(CUR_DIR, './' + out_dir + '/'))
    if not check_device():
        print 'Error no device'
        print 'Quit'
        return

    adbUnlockScreen()

    # system setup
    adb.turn_airplane('0')
    adb.turn_bluetooth('0')
    adb.turn_wifi('0')
    adb.turn_gps('0')
    adb.set_display_time()

    installApk()

    result = dotest(offscreen=True)

    print result

    # comment for debug
    tr.result(result)
    tr.add_attachment(os.path.join(CUR_DIR, out_dir, 'glbench_offscreen.txt'),
                      'glbench_offscreen.txt')
    tr.add_attachment(os.path.join(CUR_DIR, out_dir, 'result.txt'),
                      'result.txt')
    tr.save()
Ejemplo n.º 2
0
def main():
    print CUR_DIR
    if not os.path.exists(os.path.join(CUR_DIR, './' + out_dir + '/')):
        os.mkdir(os.path.join(CUR_DIR, './' + out_dir + '/'))
    adbUnlockScreen()

    # for debug, comment it
    adb.turn_airplane('1')
    adb.turn_bluetooth('0')
    adb.turn_wifi('0')
    adb.turn_gps('0')
    adb.set_display_time()

    prepareAPK()

    for i in range(4):
        result = doTestGetResult()

        if result == 'error, no result found':
            os.system('adb reboot')
            continue
        else:
            break

    print 'Test Result of Antutu is : ', result

    # for debug, comment it

    tr.result(result)
    # tr.add_attachment(os.path.join(CUR_DIR,out_dir+'/result.txt'))
    tr.add_attachment(os.path.join(CUR_DIR, out_dir, 'antutu.txt'),
                      'antutu.txt')
    # tr.result('antutu_5.6_total_result', result, 'score')
    # tr.add_attachment('/home/bxtp/atf_slave2/runner/scripts/script_benchmark/20170815_032034/antutu.txt')
    tr.save()
Ejemplo n.º 3
0
def rlbench_main():

    print CUR_DIR
    if not os.path.exists(os.path.join(CUR_DIR, './' + out_dir + '/')):
        os.mkdir(os.path.join(CUR_DIR, './' + out_dir + '/'))
    if not check_device():
        print 'Error no device'
        print 'Quit'
        return

    os.system('adb root')
    adbUnlockScreen()

    # comment for debug
    # adb.system_setup(tog_bt=True,tog_wifi=True,tog_gps=True,)
    adb.turn_airplane('1')
    adb.turn_bluetooth('0')
    adb.turn_wifi('0')
    adb.turn_gps('0')
    adb.set_display_time()

    installApk()
    #dotest()
    result = dotest()

    print "Result is {overall}".format(overall=result)
    adbPressHome()
Ejemplo n.º 4
0
def main():
    print CUR_DIR
    if not os.path.exists(os.path.join(CUR_DIR, './' + out_dir + '/')):
        os.mkdir(os.path.join(CUR_DIR, './' + out_dir + '/'))
    if not check_device():
        print 'Error no device'
        print 'Quit'
        return
    adbUnlockScreen()

    # system setup
    adb.turn_airplane('1')
    adb.turn_bluetooth('0')
    adb.turn_wifi('0')
    adb.turn_gps('0')
    adb.set_display_time()

    installApk()
    for i in range(4):
        startGFX_brxtp()
        click_test_offscreen_gfx311()
        waitDisplay(180)
        result_str = get_result()
        adb.killapp()
        adb.clear_data(package_name)
        if result_str == 'Error, result not found':
            continue
        else:
            break

    print 'The Result is: \n' + result_str

    # for debug, comment it

    tr.result(result_str)
    tr.add_attachment(
        os.path.join(CUR_DIR, out_dir, 'manhattan_offscreen.txt'),
        'manhattan_offscreen.txt')
    tr.save()
Ejemplo n.º 5
0
def main():

    print CUR_DIR
    if not os.path.exists(os.path.join(CUR_DIR, './' + out_dir + '/')):
        os.mkdir(os.path.join(CUR_DIR, './' + out_dir + '/'))
    if not check_device():
        print 'Error no device'
        print 'Quit'
        return

    os.system('adb root')
    adbUnlockScreen()

    # comment for debug
    # adb.system_setup(tog_bt=True,tog_wifi=True,tog_gps=True,)
    os.system('adb shell input keyevent KEYCODE_DPAD_UP')
    time.sleep(2)
    os.system('adb shell input keyevent KEYCODE_DPAD_CENTER')
    time.sleep(2)
    adb.turn_airplane('1')
    adb.turn_bluetooth('0')
    adb.turn_wifi('0')
    adb.turn_gps('0')
    adb.set_display_time()

    installApk()
    #dotest()
    result = dotest()

    print "Result is {overall}".format(overall=result)
    adbPressHome()
    # comment for debug
    tr.result(result)
    tr.add_attachment(os.path.join(CUR_DIR, out_dir, 'rlbenchmark.txt'),
                      'rlbenchmark.txt')
    tr.save()