未验证 提交 99bf6228 编写于 作者: W wuhuanzhou 提交者: GitHub

op benchmark ci retry with specfied id (#30743)

* op benchmark ci retry with specfied id, notest, test=op_benchmark

* fix parse case name with case id, notest, test=op_benchmark

* remove test code, test=develop
上级 99bd16eb
...@@ -30,7 +30,7 @@ def parse_case_name(log_file_name): ...@@ -30,7 +30,7 @@ def parse_case_name(log_file_name):
case_id, case_info = log_file_name.split("-") case_id, case_info = log_file_name.split("-")
direction = case_info.split(".")[0].split("_")[-1] direction = case_info.split(".")[0].split("_")[-1]
return "%s(%s)" % (case_id, direction) return "%s (%s)" % (case_id, direction)
def parse_log_file(log_file): def parse_log_file(log_file):
...@@ -127,15 +127,18 @@ def update_api_info_file(fail_case_list, api_info_file): ...@@ -127,15 +127,18 @@ def update_api_info_file(fail_case_list, api_info_file):
check_path_exists(api_info_file) check_path_exists(api_info_file)
# set of case names for performance check failures # set of case names for performance check failures
fail_case_set = set(map(lambda x: x.rsplit('_', 1)[0], fail_case_list)) parse_case_id_f = lambda x: x.split()[0].rsplit('_', 1)
fail_case_dict = dict(map(parse_case_id_f, fail_case_list))
# list of api infos for performance check failures # list of api infos for performance check failures
api_info_list = list() api_info_list = list()
with open(api_info_file) as f: with open(api_info_file) as f:
for line in f: for line in f:
case = line.split(',')[0] line_list = line.split(',')
if case in fail_case_set: case = line_list[0].split(':')[0]
api_info_list.append(line) if case in fail_case_dict:
line_list[0] = "%s:%s" % (case, fail_case_dict[case])
api_info_list.append(','.join(line_list))
# update api info file # update api info file
with open(api_info_file, 'w') as f: with open(api_info_file, 'w') as f:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册