validate:launcher: Enhance support for running ssim tests
authorThibault Saunier <tsaunier@igalia.com>
Tue, 7 Jan 2020 18:48:51 +0000 (15:48 -0300)
committerThibault Saunier <tsaunier@igalia.com>
Wed, 11 Mar 2020 19:36:20 +0000 (16:36 -0300)
Using a special 'ssim' variable in pipeline dicts to activate it
Similare to what we do for validateflow

validate/launcher/utils.py

index 4b54c7067fff02f4ca08288b2357203817008b8d..f6c0dedab94d13ff738e3231c9162b947b29b243 100644 (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