validate:launcher: Enhance support for running ssim tests

Using a special 'ssim' variable in pipeline dicts to activate it
Similare to what we do for validateflow
This commit is contained in:
Thibault Saunier 2020-01-07 15:48:51 -03:00
parent b4c1424ea2
commit 2e45db5ba4

View file

@ -640,6 +640,13 @@ def format_config_template(extra_data, config_text, test_name):
test_name.replace('.', os.sep))
extra_vars['validateflow'] = "validateflow, expectations-dir=\"%s\", actual-results-dir=\"%s\"" % (expectations_dir, actual_results_dir)
if 'ssim-results-dir' in extra_vars:
ssim_results = extra_vars['ssim-results-dir']
extra_vars['ssim'] = "validatessim, result-output-dir=\"%s\", output-dir=\"%s\"" % (
os.path.join(ssim_results, test_name.replace('.', os.sep), 'diff-images'),
os.path.join(ssim_results, test_name.replace('.', os.sep), 'images'),
)
return config_text % extra_vars