aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/run_tests/report_utils.py
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2015-12-09 15:34:27 -0800
committerGravatar Craig Tiller <ctiller@google.com>2015-12-09 15:34:27 -0800
commitb897337994a355d7d8aeca043b608fa1e100bf79 (patch)
tree779439f28e3f20bcd17acc6fa24c679e19fc58c7 /tools/run_tests/report_utils.py
parentface446997e271107553a071c46f8ca0fde0bebb (diff)
parent9bfc2ce06cd700fcbaa701914b4b294b7d601948 (diff)
Merge github.com:grpc/grpc into connectivity-state
Diffstat (limited to 'tools/run_tests/report_utils.py')
-rw-r--r--tools/run_tests/report_utils.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/tools/run_tests/report_utils.py b/tools/run_tests/report_utils.py
index adeb707a07..12b1972f1a 100644
--- a/tools/run_tests/report_utils.py
+++ b/tools/run_tests/report_utils.py
@@ -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))