diff options
Diffstat (limited to 'framework/summary.py')
-rw-r--r-- | framework/summary.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/framework/summary.py b/framework/summary.py index 6ee12268d..6a76d885a 100644 --- a/framework/summary.py +++ b/framework/summary.py @@ -382,6 +382,24 @@ class Summary: for key, value in each.tests.iteritems(): temp_path = path.join(destination, each.name, path.dirname(key)) + images = value.get('images') + + images_table = '' + if images: + images_table += '<table>' + images_table += ' <tr>' + images_table += ' <td></td>' + images_table += ' <td>reference</td>' + images_table += ' <td>rendered</td>' + images_table += ' </tr>' + for image in images: + images_table += ' <tr>' + images_table += ' <td>{0}</td>'.format(image['image_desc']) + images_table += ' <td><img src="file://{0}"></td>'.format(image['image_ref']) + images_table += ' <td><img src="file://{0}"></td>'.format(image['image_render']) + images_table += ' </tr>' + images_table += '</table>' + if value['result'] not in exclude: # os.makedirs is very annoying, it throws an OSError if # the path requested already exists, so do this check to @@ -404,6 +422,7 @@ class Summary: info=value.get('info', 'None'), traceback=value.get('traceback', 'None'), command=value.get('command', 'None'), + images_table=images_table, dmesg=value.get('dmesg', 'None'), css=path.relpath(result_css, temp_path), index=path.relpath(index, temp_path))) |