示例#1
0
def run_one_process(exe_file_name, how_much_wait_result):
    # Запускаем
    local_env = os.environ.copy()
    tic()
    # Около 0.3.. sec! на загрузку выполнение, а по факту на загрузку *.bin
    out = run_bin_with_wait(exe_file_name, local_env, how_much_wait_result)
    toc()
    result = parser_out(out)
    report_gtest_result(result)
def test_run_gtest_no_parallel():
    tic()
    print '\nWarning: Need run at least one shard...\n'

    generator = run_gtests(RUNNER_TASK_FILE, count_cores, BIN_FILE_NAME)
    toc()

    tic()
    # Really make job!
    for i in generator:
        a, b = i
        print a
    toc()
示例#3
0
def f(x):
    # Run tests
   # print x
    local_env = os.environ.copy()
    local_env['GTEST_TOTAL_SHARDS'] = str(x[0])
    local_env['GTEST_SHARD_INDEX'] = str(x[1])
    exe_local = x[2]
    time_to_wait = x[3]

    # kill!! портим вызов!
    tic()
    out = run_bin_with_wait(exe_local, local_env, time_to_wait)
    toc()
    report = parse_out_not_gen(out)
    return report
示例#4
0
    path_to_cfg = script_work_dir + os.sep + 'direct-launcher.yaml'
    how_much_wait_result = Configurer(path_to_cfg)\
        .get_double('how_much_wait_result')

    # Get bin file
    exe_file_name = sys.argv[EXE_FILE_NAME_IDX]
    work_dir = sys.argv[WORK_DIR_IDX]

    # Переходим в папку с исполняемым файлом
    head, tail = os.path.split(exe_file_name)
    os.chdir(head)

    #print 'Work dir:', os.getcwd()
    print 'Wait result: ', how_much_wait_result, ' sec. For change this edit ', path_to_cfg

    # !!
    os.chdir(work_dir)
    print 'Work dir:', os.getcwd()

    launcher(exe_file_name, how_much_wait_result)

if __name__ == '__main__':
    #tic()
    #main(sys.argv, mp_launcher)
    #toc()

    tic()
    main(sys.argv, run_one_process)
    toc()