radeonsi/tests: clarify the output when results changes

Print up to 10 results that are different from the baseline:

   2 new results:
     * spec@!opengl 1.0@rasterpos,Crash
     * spec@glsl-es-3.00@execution@built-in-functions@vs-packhalf2x16,Fail

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29612>
This commit is contained in:
Pierre-Eric Pelloux-Prayer
2024-06-17 13:55:30 +02:00
committed by Marge Bot
parent d9f150f18b
commit 1a06494e65

View File

@@ -304,9 +304,20 @@ def run_cmd(args, verbosity):
def verify_results(results):
with open(results) as file:
if len(file.readlines()) == 0:
lines = file.readlines()
if len(lines) == 0:
return True
print_red("New results (fails or pass). Check {}".format(results))
print("{} new result{}:".format(len(lines), 's' if len(lines) > 1 else ''))
for i in range(min(10, len(lines))):
print(" * ", end='')
if "Pass" in lines[i]:
print_green(lines[i][:-1])
else:
print_red(lines[i][:-1])
if len(lines) > 10:
print_yellow("...")
print("Full results: {}".format(results))
return False