diff --git a/avocado/core/html.py b/avocado/core/html.py index 19e1b2b717e1f6c8a7fb04ab96954dca4131afa9..71560b3452f250be0125c4628daeed9485f01cbb 100644 --- a/avocado/core/html.py +++ b/avocado/core/html.py @@ -176,15 +176,17 @@ class ReportModel(object): for s_f in sysinfo_files: sysinfo_dict = {} sysinfo_path = os.path.join(base_path, s_f) + sysinfo_dict['file'] = " ".join(s_f.split("_")) + sysinfo_dict['element_id'] = '%s_heading_%s' % (phase, s_id) + sysinfo_dict['collapse_id'] = '%s_collapse_%s' % (phase, s_id) try: with codecs.open(sysinfo_path, 'r', encoding="utf-8") as sysinfo_file: - sysinfo_dict['file'] = " ".join(s_f.split("_")) sysinfo_dict['contents'] = sysinfo_file.read() - sysinfo_dict['element_id'] = '%s_heading_%s' % (phase, s_id) - sysinfo_dict['collapse_id'] = '%s_collapse_%s' % (phase, s_id) except (OSError, UnicodeDecodeError) as details: - sysinfo_dict[s_f] = ('Error reading sysinfo file %s: %s' % - (sysinfo_path, details)) + path = os.path.relpath(sysinfo_path, self.html_output_dir) + sysinfo_dict['err'] = ("Error reading sysinfo file, check out" + "the file %s: %s" + % (path, path, details)) sysinfo_list.append(sysinfo_dict) s_id += 1 return sysinfo_list diff --git a/avocado/core/resources/htmlresult/templates/report.mustache b/avocado/core/resources/htmlresult/templates/report.mustache index fd4fc50628b2ae73e3f7836c2debe4446c80126c..43617e2d2641a3c852b6858491838abef17f957d 100644 --- a/avocado/core/resources/htmlresult/templates/report.mustache +++ b/avocado/core/resources/htmlresult/templates/report.mustache @@ -101,6 +101,7 @@
{{contents}}
+ {{& err}}