improve status reporting

This commit is contained in:
Ivan Avdeev 2025-02-06 14:00:08 -05:00
parent 6e31a068ee
commit c7970f9952

@ -107,7 +107,7 @@ def compile():
subprocess.run(['make', 'imagecompare'], cwd=ROOT, check=True)
def copy_assets():
print('Copying assets')
print('Copying assets...')
shutil.copy2(src=f'{ROOT}/vulkan_debug.wad', dst=f'{args.xash_dir}/valve/')
shutil.copytree(src=f'{ROOT}/maps', dst=f'{args.xash_dir}/valve/maps/', dirs_exist_ok=True)
shutil.copytree(src=f'{ROOT}/save', dst=f'{args.xash_dir}/valve/save/', dirs_exist_ok=True)
@ -115,7 +115,7 @@ def copy_assets():
make_script(script, args.tests)
def render():
print('Running xash3d')
print('Running xash3d...')
mkdir_p(f'{args.xash_dir}/valve/rendertest')
env = os.environ.copy()
env['RADV_PERFTEST'] = 'rt'
@ -133,11 +133,11 @@ def compare_one(test: str, channel: str, image_base: str, image_gold: str, image
case 0:
pass
case 1:
raise Exception(f'FATAL imagecompare error: TBD')
raise Exception(f'FATAL imagecompare failed: stdout={result.stdout} stderr={result.stderr}')
case 2:
print(f'ERROR: {image_base} differ by more than threshold')
case _:
raise Exception(f'Unexpected imagecompare return code {result.returncode}')
raise Exception(f'Unexpected imagecompare return code {result.returncode}: {result}')
ret = json.loads(result.stdout)
ret['test'] = test
ret['channel'] = channel
@ -152,7 +152,7 @@ def compare():
screenshot_base = f'{args.xash_dir}/valve/rendertest'
diffs = []
command_png()
print(f'Compare...')
print(f'Comparing...')
with concurrent.futures.ThreadPoolExecutor() as executor:
for test in args.tests:
for channel, _ in channels.items():
@ -182,6 +182,7 @@ def command_compare():
compare()
def command_png():
print(f'Converting to png...')
screenshot_base = f'{args.xash_dir}/valve/rendertest'
new_gold_base = f'{WORKDIR}/gold'
mkdir_p(new_gold_base)