Skip to content
Snippets Groups Projects
Commit 467a02af authored by Jan Tattermusch's avatar Jan Tattermusch
Browse files

Merge pull request #4367 from adelez/move_report_template

Moved the report template under tools/run_tests.
parents 5b763f53 12877c95
No related branches found
No related tags found
No related merge requests found
......@@ -78,8 +78,7 @@ def render_interop_html_report(
client_langs, server_langs, test_cases, auth_test_cases, http2_cases,
resultset, num_failures, cloud_to_prod, http2_interop):
"""Generate HTML report for interop tests."""
html_report_dir = 'reports'
template_file = os.path.join(html_report_dir, 'interop_html_report.template')
template_file = 'tools/run_tests/interop_html_report.template'
try:
mytemplate = Template(filename=template_file, format_exceptions=True)
except NameError:
......@@ -104,6 +103,9 @@ def render_interop_html_report(
'num_failures': num_failures,
'cloud_to_prod': cloud_to_prod,
'http2_interop': http2_interop}
html_file_path = os.path.join(html_report_dir, 'index.html')
html_report_out_dir = 'reports'
if not os.path.exists(html_report_out_dir):
os.mkdir(html_report_out_dir)
html_file_path = os.path.join(html_report_out_dir, 'index.html')
with open(html_file_path, 'w') as output_file:
mytemplate.render_context(Context(output_file, **args))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment