blob: 6d9de5c62e89e8e6726b470ecbcba495c4415701 [file] [log] [blame]
Adele Zhou3bc7ba42015-11-05 10:21:58 -08001<!DOCTYPE html>
2<html lang="en">
3<head><title>Interop Test Result</title></head>
4<body>
5
6<%def name="fill_one_test_result(shortname, resultset)">
7 % if shortname in resultset:
8 ## Because interop tests does not have runs_per_test flag, each test is
9 ## run once. So there should only be one element for each result.
10 <% result = resultset[shortname][0] %>
11 % if result.state == 'PASSED':
12 <td bgcolor="green">PASS</td>
13 % else:
14 <%
15 tooltip = ''
16 if result.returncode > 0 or result.message:
17 if result.returncode > 0:
18 tooltip = 'returncode: %d ' % result.returncode
19 if result.message:
20 tooltip = '%smessage: %s' % (tooltip, result.message)
21 %>
22 % if result.state == 'FAILED':
23 <td bgcolor="red">
24 % if tooltip:
25 <a href="#" data-toggle="tooltip" data-placement="auto" title="${tooltip | h}">FAIL</a></td>
26 % else:
27 FAIL</td>
28 % endif
29 % elif result.state == 'TIMEOUT':
30 <td bgcolor="yellow">
31 % if tooltip:
32 <a href="#" data-toggle="tooltip" data-placement="auto" title="${tooltip | h}">TIMEOUT</a></td>
33 % else:
34 TIMEOUT</td>
35 % endif
36 % endif
37 % endif
38 % else:
39 <td bgcolor="magenta">Not implemented</td>
40 % endif
41</%def>
42
Carl Mastrangeloe7f8e8e2015-12-08 17:22:44 -080043<%def name="fill_one_http2_test_result(shortname, resultset)">
44 ## keep this mostly in sync with the template above
45 % if shortname in resultset:
46 ## Because interop tests does not have runs_per_test flag, each test is
47 ## run once. So there should only be one element for each result.
48 <% result = resultset[shortname][0] %>
Adele Zhoud63e90d2016-02-01 15:19:34 -080049 % if result.http2results:
50 <td bgcolor="white">
51 <div style="width:95%; border: 1px solid black; position: relative; padding: 3px;">
52 <span style="position: absolute; left: 45%;">${int(result.http2results['percent'] * 100)}&#37;</span>
53 <div style="height: 20px;
54 background-color: hsl(${result.http2results['percent'] * 120}, 100%, 50%);
55 width: ${result.http2results['percent'] * 100}%;"
56 title="${result.http2results['failed_cases'] | h}"></div>
57 </div>
58 </td>
59 % else:
60 <td bgcolor="red">No result is found!</td>
61 % endif
Carl Mastrangeloe7f8e8e2015-12-08 17:22:44 -080062 % else:
63 <td bgcolor="magenta">Not implemented</td>
64 % endif
65</%def>
66
Adele Zhoub9e66cc2016-02-03 13:12:23 -080067<%def name="display_cloud_to_prod_result(prod_server)">
Adele Zhou3bc7ba42015-11-05 10:21:58 -080068 ## Each column header is the client language.
Adele Zhou3bc7ba42015-11-05 10:21:58 -080069 <table style="width:100%" border="1">
70 <tr bgcolor="#00BFFF">
71 <th>Client languages &#9658;<br/>Test Cases &#9660;</th>
72 % for client_lang in client_langs:
73 <th>${client_lang}</th>
74 % endfor
75 </tr>
76 % for test_case in test_cases + auth_test_cases:
77 <tr><td><b>${test_case}</b></td>
78 % for client_lang in client_langs:
79 <%
80 if test_case in auth_test_cases:
Adele Zhoub9e66cc2016-02-03 13:12:23 -080081 shortname = 'cloud_to_prod_auth:%s:%s:%s' % (
82 prod_server, client_lang, test_case)
Adele Zhou3bc7ba42015-11-05 10:21:58 -080083 else:
Adele Zhoub9e66cc2016-02-03 13:12:23 -080084 shortname = 'cloud_to_prod:%s:%s:%s' % (
85 prod_server, client_lang, test_case)
Adele Zhou3bc7ba42015-11-05 10:21:58 -080086 %>
87 ${fill_one_test_result(shortname, resultset)}
88 % endfor
89 </tr>
90 % endfor
91 </table>
Adele Zhoub9e66cc2016-02-03 13:12:23 -080092</%def>
93
94% if num_failures > 1:
95 <p><h2><font color="red">${num_failures} tests failed!</font></h2></p>
96% elif num_failures:
97 <p><h2><font color="red">${num_failures} test failed!</font></h2></p>
98% else:
99 <p><h2><font color="green">All tests passed!</font></h2></p>
100% endif
101
102% if cloud_to_prod:
103 % for prod_server in prod_servers:
104 <h2>Cloud to ${prod_server}</h2>
105 ${display_cloud_to_prod_result(prod_server)}
106 % endfor
Adele Zhou3bc7ba42015-11-05 10:21:58 -0800107% endif
108
Alexander Polcyn50fdc8a2017-02-09 21:06:08 -0800109% if http2_server_cases:
110 <h2>HTTP/2 Server Tests</h2>
Adele Zhou429e5602017-02-06 14:57:56 -0800111 ## Each column header is the client language.
112 <table style="width:100%" border="1">
113 <tr bgcolor="#00BFFF">
114 <th>Client languages &#9658;<br/>Test Cases &#9660;</th>
Alexander Polcyn50fdc8a2017-02-09 21:06:08 -0800115 % for client_lang in client_langs:
Adele Zhou429e5602017-02-06 14:57:56 -0800116 <th>${client_lang}</th>
117 % endfor
118 </tr>
Alexander Polcyn50fdc8a2017-02-09 21:06:08 -0800119 % for test_case in http2_server_cases:
Adele Zhou429e5602017-02-06 14:57:56 -0800120 <tr><td><b>${test_case}</b></td>
Alexander Polcyn50fdc8a2017-02-09 21:06:08 -0800121 % for client_lang in client_langs:
Adele Zhou429e5602017-02-06 14:57:56 -0800122 <%
123 shortname = 'cloud_to_cloud:%s:http2_server:%s' % (client_lang,
124 test_case)
125 %>
126 ${fill_one_test_result(shortname, resultset)}
127 % endfor
128 </tr>
129 % endfor
130 </table>
131% endif
132
Adele Zhou3bc7ba42015-11-05 10:21:58 -0800133% if http2_interop:
134 ## Each column header is the server language.
135 <h2>HTTP/2 Interop</h2>
136 <table style="width:100%" border="1">
137 <tr bgcolor="#00BFFF">
138 <th>Servers &#9658;<br/>Test Cases &#9660;</th>
139 % for server_lang in server_langs:
140 <th>${server_lang}</th>
141 % endfor
142 % if cloud_to_prod:
Adele Zhoub9e66cc2016-02-03 13:12:23 -0800143 % for prod_server in prod_servers:
144 <th>${prod_server}</th>
145 % endfor
Adele Zhou3bc7ba42015-11-05 10:21:58 -0800146 % endif
147 </tr>
148 % for test_case in http2_cases:
149 <tr><td><b>${test_case}</b></td>
150 ## Fill up the cells with test result.
151 % for server_lang in server_langs:
152 <%
153 shortname = 'cloud_to_cloud:http2:%s_server:%s' % (
154 server_lang, test_case)
155 %>
Carl Mastrangeloe7f8e8e2015-12-08 17:22:44 -0800156 ${fill_one_http2_test_result(shortname, resultset)}
Adele Zhou3bc7ba42015-11-05 10:21:58 -0800157 % endfor
158 % if cloud_to_prod:
Adele Zhoub9e66cc2016-02-03 13:12:23 -0800159 % for prod_server in prod_servers:
160 <% shortname = 'cloud_to_prod:%s:http2:%s' % (prod_server, test_case) %>
161 ${fill_one_http2_test_result(shortname, resultset)}
162 % endfor
Adele Zhou3bc7ba42015-11-05 10:21:58 -0800163 % endif
164 </tr>
165 % endfor
166 </table>
167% endif
168
169% if server_langs:
170 % for test_case in test_cases:
171 ## Each column header is the client language.
172 <h2>${test_case}</h2>
173 <table style="width:100%" border="1">
174 <tr bgcolor="#00BFFF">
175 <th>Client languages &#9658;<br/>Server languages &#9660;</th>
176 % for client_lang in client_langs:
177 <th>${client_lang}</th>
178 % endfor
179 </tr>
180 ## Each row head is the server language.
181 % for server_lang in server_langs:
182 <tr>
183 <td><b>${server_lang}</b></td>
184 % for client_lang in client_langs:
185 <%
186 shortname = 'cloud_to_cloud:%s:%s_server:%s' % (
187 client_lang, server_lang, test_case)
188 %>
189 ${fill_one_test_result(shortname, resultset)}
190 % endfor
191 </tr>
192 % endfor
193 </table>
194 % endfor
195% endif
196
197<script>
198 $(document).ready(function(){$('[data-toggle="tooltip"]').tooltip();});
199</script>
200</body>
201</html>