summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorAndres Gomez <agomez@igalia.com>2020-11-12 16:47:00 +0200
committerAndres Gomez <agomez@igalia.com>2020-11-16 22:05:36 +0200
commit3f88240375ac7293a29580d435b75577e9098599 (patch)
treed608ce380e8044f5f00d28ff38f3e9b65c7324b2 /framework
parent0fda9f67a782edec640998286e7b6058e8933d17 (diff)
templates: fix summary generation when not all image keys exist
After d03bca72d ("templates: fix loop iterating over value.images array"), the inclusion of images in the summary report was fixed but it also re-introduced a pre-existing problem: upon an OSError exception when running the X Test suite, the images elements may not include all the expected dict keywords. We now take care of that scenario, for backward compatibility, and make sure that all the keywords will exist in the future. Fixes: e1057c4aa ("tests/xts.py: Add a tests file for the X Test suite.") Fixes: 5ef7f3b87 ("framework: Add xorg tests") Closes: https://gitlab.freedesktop.org/mesa/piglit/issues/43 Reported-by: Michel Dänzer <mdaenzer@redhat.com> Signed-off-by: Andres Gomez <agomez@igalia.com> Tested-by: Michel Dänzer <mdaenzer@redhat.com> Reviewed-by: Dylan Baker <dylan@pnwbakers.com> Part-of: <https://gitlab.freedesktop.org/mesa/piglit/-/merge_requests/413>
Diffstat (limited to 'framework')
-rw-r--r--framework/test/xorg.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/framework/test/xorg.py b/framework/test/xorg.py
index 592419a1d..ebc512c25 100644
--- a/framework/test/xorg.py
+++ b/framework/test/xorg.py
@@ -79,7 +79,9 @@ class XTSTest(Test): # pylint: disable=too-few-public-methods
try:
out = subprocess.check_output(command, cwd=self.cwd)
except OSError:
- images.append({'image_desc': 'image processing failed'})
+ images.append({'image_desc': 'image processing failed',
+ 'image_ref': None,
+ 'image_render': None})
continue
# Each Err*.err log contains a rendered image, and a reference