aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools
diff options
context:
space:
mode:
authorGravatar Adele Zhou <adelez@google.com>2016-02-01 15:19:34 -0800
committerGravatar Adele Zhou <adelez@google.com>2016-02-01 16:30:38 -0800
commitd63e90de8936a12e0282f74c23a05023c6420204 (patch)
tree91ca959a56a58ce67ce7639f35b725d7c84d81be /tools
parent6d7ae08a3376377e11f8e3fe043e0b45dbde48aa (diff)
Handle the case when result.http2results is None.
Diffstat (limited to 'tools')
-rw-r--r--tools/run_tests/interop_html_report.template22
1 files changed, 13 insertions, 9 deletions
diff --git a/tools/run_tests/interop_html_report.template b/tools/run_tests/interop_html_report.template
index c01bdf7a77..114a508c31 100644
--- a/tools/run_tests/interop_html_report.template
+++ b/tools/run_tests/interop_html_report.template
@@ -46,15 +46,19 @@
## Because interop tests does not have runs_per_test flag, each test is
## run once. So there should only be one element for each result.
<% result = resultset[shortname][0] %>
- <td bgcolor="white">
- <div style="width:95%; border: 1px solid black; position: relative; padding: 3px;">
- <span style="position: absolute; left: 45%;">${int(result.http2results['percent'] * 100)}&#37;</span>
- <div style="height: 20px;
- background-color: hsl(${result.http2results['percent'] * 120}, 100%, 50%);
- width: ${result.http2results['percent'] * 100}%;"
- title="${result.http2results['failed_cases'] | h}"></div>
- </div>
- </td>
+ % if result.http2results:
+ <td bgcolor="white">
+ <div style="width:95%; border: 1px solid black; position: relative; padding: 3px;">
+ <span style="position: absolute; left: 45%;">${int(result.http2results['percent'] * 100)}&#37;</span>
+ <div style="height: 20px;
+ background-color: hsl(${result.http2results['percent'] * 120}, 100%, 50%);
+ width: ${result.http2results['percent'] * 100}%;"
+ title="${result.http2results['failed_cases'] | h}"></div>
+ </div>
+ </td>
+ % else:
+ <td bgcolor="red">No result is found!</td>
+ % endif
% else:
<td bgcolor="magenta">Not implemented</td>
% endif