improve status reporting
This commit is contained in:
parent
6e31a068ee
commit
c7970f9952
@ -107,7 +107,7 @@ def compile():
|
|||||||
subprocess.run(['make', 'imagecompare'], cwd=ROOT, check=True)
|
subprocess.run(['make', 'imagecompare'], cwd=ROOT, check=True)
|
||||||
|
|
||||||
def copy_assets():
|
def copy_assets():
|
||||||
print('Copying assets')
|
print('Copying assets...')
|
||||||
shutil.copy2(src=f'{ROOT}/vulkan_debug.wad', dst=f'{args.xash_dir}/valve/')
|
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}/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)
|
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)
|
make_script(script, args.tests)
|
||||||
|
|
||||||
def render():
|
def render():
|
||||||
print('Running xash3d')
|
print('Running xash3d...')
|
||||||
mkdir_p(f'{args.xash_dir}/valve/rendertest')
|
mkdir_p(f'{args.xash_dir}/valve/rendertest')
|
||||||
env = os.environ.copy()
|
env = os.environ.copy()
|
||||||
env['RADV_PERFTEST'] = 'rt'
|
env['RADV_PERFTEST'] = 'rt'
|
||||||
@ -133,11 +133,11 @@ def compare_one(test: str, channel: str, image_base: str, image_gold: str, image
|
|||||||
case 0:
|
case 0:
|
||||||
pass
|
pass
|
||||||
case 1:
|
case 1:
|
||||||
raise Exception(f'FATAL imagecompare error: TBD')
|
raise Exception(f'FATAL imagecompare failed: stdout={result.stdout} stderr={result.stderr}')
|
||||||
case 2:
|
case 2:
|
||||||
print(f'ERROR: {image_base} differ by more than threshold')
|
print(f'ERROR: {image_base} differ by more than threshold')
|
||||||
case _:
|
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 = json.loads(result.stdout)
|
||||||
ret['test'] = test
|
ret['test'] = test
|
||||||
ret['channel'] = channel
|
ret['channel'] = channel
|
||||||
@ -152,7 +152,7 @@ def compare():
|
|||||||
screenshot_base = f'{args.xash_dir}/valve/rendertest'
|
screenshot_base = f'{args.xash_dir}/valve/rendertest'
|
||||||
diffs = []
|
diffs = []
|
||||||
command_png()
|
command_png()
|
||||||
print(f'Compare...')
|
print(f'Comparing...')
|
||||||
with concurrent.futures.ThreadPoolExecutor() as executor:
|
with concurrent.futures.ThreadPoolExecutor() as executor:
|
||||||
for test in args.tests:
|
for test in args.tests:
|
||||||
for channel, _ in channels.items():
|
for channel, _ in channels.items():
|
||||||
@ -182,6 +182,7 @@ def command_compare():
|
|||||||
compare()
|
compare()
|
||||||
|
|
||||||
def command_png():
|
def command_png():
|
||||||
|
print(f'Converting to png...')
|
||||||
screenshot_base = f'{args.xash_dir}/valve/rendertest'
|
screenshot_base = f'{args.xash_dir}/valve/rendertest'
|
||||||
new_gold_base = f'{WORKDIR}/gold'
|
new_gold_base = f'{WORKDIR}/gold'
|
||||||
mkdir_p(new_gold_base)
|
mkdir_p(new_gold_base)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user