Skip to content

Commit

Permalink
Merge pull request #1369 from riscv-collab/improve-report
Browse files Browse the repository at this point in the history
Improve make report with extra test arguments
  • Loading branch information
kito-cheng authored Nov 21, 2023
2 parents 82c3d65 + 0e5c405 commit 6b60183
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions scripts/testsuite-filter
Original file line number Diff line number Diff line change
Expand Up @@ -187,20 +187,23 @@ def filter_result(tool, libc, white_list_base_dir, unexpected_results):
arch = ""
abi = ""
cmodel = ""
other_args = []
for info in variation.split('/'):
if info.startswith('-march'):
arch = info[7:]
elif info.startswith('-mabi'):
abi = info[6:]
elif info.startswith('-mcmodel'):
cmodel = info[9:]
elif info != 'riscv-sim':
other_args.append(info)

white_list = \
get_white_list(arch, abi, libc,
os.path.join(white_list_base_dir, tool),
is_gcc)
# filter!
config = (arch, abi, cmodel)
config = (arch, abi, cmodel, ":".join(other_args))
fail_count = 0
unexpected_result_list = []
if is_gcc:
Expand Down Expand Up @@ -234,8 +237,8 @@ def filter_result(tool, libc, white_list_base_dir, unexpected_results):


if len(unexpected_result_list) != 0:
print ("\t\t=== %s: Unexpected fails for %s %s %s ===" \
% (testtool, arch, abi, cmodel))
print ("\t\t=== %s: Unexpected fails for %s %s %s %s ===" \
% (testtool, arch, abi, cmodel, " ".join(other_args)))
for ur in unexpected_result_list:
print (ur)

Expand All @@ -257,7 +260,7 @@ def filter_result(tool, libc, white_list_base_dir, unexpected_results):
print (" | # of unexpected case")
print (" |%s |" % bar)
for config, result in summary.items():
arch, abi, cmodel = config
arch, abi, cmodel, other_args = config
print (" %10s/ %6s/ %6s |" % (arch, abi, cmodel), end='')
for tool in toollist:
if tool not in summary[config]:
Expand All @@ -271,6 +274,8 @@ def filter_result(tool, libc, white_list_base_dir, unexpected_results):
fail_count = summary[config][tool]
print ("%13d |" % fail_count, end='')
print ("")
if (len(other_args)):
print (" " + other_args.replace(":", " "))
if any_fail or len(summary.items()) == 0:
return 1
else:
Expand Down

0 comments on commit 6b60183

Please sign in to comment.