code
stringlengths
3
6.57k
line.startswith( '>' )
comments.split( delimiter )
zip( attrs, comments )
sequences.append( seqType( sequence, **attributes )
strip('\r\n')
line.strip('\r\n')
comments.split( delimiter )
zip( attrs, comments )
sequences.append( seqType( sequence, **attributes )
cls( sequences )
Copyright (C)
get_apikey()
test_api_headers_property()
PlaformApi(access_token="dummy")
test_mock_request_post(mocker)
mocker.patch("requests.post", return_value=True)
PlaformApi(access_token="dummy")
api.post("dummy_url", data={"foo": "bar"})
test_mock_request_scoped_access_token_excception(mocker)
get_mock_response(500, reason, text)
mocker.patch("here_location_services.platform.apis.api.Api.post", return_value=mock_response)
AAAOauth2Api(base_url="dummy")
pytest.raises(Exception)
aaa_api.request_scoped_access_token(oauth=oauth, data="dummy_data")
Copyright (c)
Copyright (c)
get_next_step(start, end, current, fail_flag)
dump_exec_output(msg, ret_code, output, err_output, time_expired, num)
common.log_msg(logging.DEBUG, msg + " (process " + str(num)
common.log_msg(logging.DEBUG, "Ret code: " + str(ret_code)
str(num)
common.log_msg(logging.DEBUG, "Time exp: " + str(time_expired)
str(num)
common.log_msg(logging.DEBUG, "Output: " + str(output, "utf-8")
str(num)
common.log_msg(logging.DEBUG, "Err output: " + str(err_output, "utf-8")
str(num)
execute_blame_phase(valid_res, fail_target, inject_str, num, phase_num)
common.run_cmd(["make", "-f", blame_test_makefile_name, fail_target.name], run_gen.compiler_timeout, num)
common.run_cmd(["make", "-f", blame_test_makefile_name, "run_" + fail_target.name], run_gen.compiler_timeout, num)
re.compile(compilers_blame_patterns[fail_target.specs.name][phase_num])
opt_num_regex.findall(str(err_output, "utf-8")
str(-1)
re.compile("\d+")
int(remove_brackets_pattern.findall(max_opt_num_str)
common.log_msg(logging.DEBUG, "Max opt num (process " + str(num)
str(max_opt_num)
regexp (phase " + str(phase_num)
str(err_output, "utf-8")
str(num)
get_next_step(start_opt, end_opt, cur_opt, failed_flag)
common.log_msg(logging.DEBUG, "Previous failed (process " + str(num)
str(failed_flag)
common.log_msg(logging.DEBUG, "Trying opt (process " + str(num)
str(start_opt)
str(cur_opt)
str(end_opt)
str(cur_opt)
str(cur_opt)
common.run_cmd(["make", "-f", blame_test_makefile_name, fail_target.name], run_gen.compiler_timeout, num)
dump_exec_output("Compilation failed", ret_code, output, err_output, time_expired, num)
common.run_cmd(["make", "-f", blame_test_makefile_name, "run_" + fail_target.name], run_gen.run_timeout, num)
dump_exec_output("Execution failed", ret_code, output, err_output, time_expired, num)
str(output, "utf-8")
split()
common.log_msg(logging.DEBUG, "Output differs (process " + str(num)
str(output, "utf-8")
split()
or (eff and not failed_flag and (cur_opt == (end_opt - 1)
common.log_msg(logging.DEBUG, "Time to finish (process " + str(num)
str(time_to_finish)
common.log_msg(logging.DEBUG, "Swapping current and end opt (process " + str(num)
common.log_msg(logging.DEBUG, "Finished blame phase, result: " + str(inject_str)
str(cur_opt)
str(num)
blame(fail_dir, valid_res, fail_target, out_dir, lock, num, inplace)
re.search("-O0", fail_target.args)
execute_blame_phase(valid_res, fail_target, blame_str, num, phase_num)
str(blame_phase_num-1)
str(blame_phase_num)
common.log_msg(logging.ERROR, "Something went wrong while executing blame_opt.py on " + str(fail_dir)
common.run_cmd(["make", "-f", blame_test_makefile_name, fail_target.name], run_gen.compiler_timeout, num)
common.run_cmd(["make", "-f", blame_test_makefile_name, "run_" + fail_target.name], run_gen.compiler_timeout, num)
opt_name_pattern.findall(str(stderr, "utf-8")
re.sub(compilers_opt_name_cutter[fail_target.specs.name][0], "", opt_name)
re.sub(compilers_opt_name_cutter[fail_target.specs.name][1], "", opt_name)
opt_name.replace(" ", "_")
opt_name_pattern.findall(str(stderr, "utf-8")
re.sub(compilers_opt_name_cutter[fail_target.specs.name][0], "", opt_name)
re.sub(compilers_opt_name_cutter[fail_target.specs.name][1], "", opt_name)
opt_name.replace(" ", "_")
common.run_cmd(["make", "-f", blame_test_makefile_name, "clean"], run_gen.compiler_timeout, num)
os.path.basename(os.path.normpath(fail_dir)
os.path.join(os.path.join(out_dir, opt_name)
common.copy_test_to_out(fail_dir, full_out_path, lock)
open(os.path.join(full_out_path, "log.txt")
log_file.write("\nBlaming for " + fail_target.name + " optset was done.\n")
log_file.write("Optimization to blame: " + real_opt_name + "\n")
log_file.write("Blame opts: " + blame_str + "\n\n")
log_file.write("Details of blaming run:\n")