blob: 46cce426b7af3e05adfe568a59e150a997a304f5 [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
109% if http2_interop:
110 ## Each column header is the server language.
111 <h2>HTTP/2 Interop</h2>
112 <table style="width:100%" border="1">
113 <tr bgcolor="#00BFFF">
114 <th>Servers &#9658;<br/>Test Cases &#9660;</th>
115 % for server_lang in server_langs:
116 <th>${server_lang}</th>
117 % endfor
118 % if cloud_to_prod:
Adele Zhoub9e66cc2016-02-03 13:12:23 -0800119 % for prod_server in prod_servers:
120 <th>${prod_server}</th>
121 % endfor
Adele Zhou3bc7ba42015-11-05 10:21:58 -0800122 % endif
123 </tr>
124 % for test_case in http2_cases:
125 <tr><td><b>${test_case}</b></td>
126 ## Fill up the cells with test result.
127 % for server_lang in server_langs:
128 <%
129 shortname = 'cloud_to_cloud:http2:%s_server:%s' % (
130 server_lang, test_case)
131 %>
Carl Mastrangeloe7f8e8e2015-12-08 17:22:44 -0800132 ${fill_one_http2_test_result(shortname, resultset)}
Adele Zhou3bc7ba42015-11-05 10:21:58 -0800133 % endfor
134 % if cloud_to_prod:
Adele Zhoub9e66cc2016-02-03 13:12:23 -0800135 % for prod_server in prod_servers:
136 <% shortname = 'cloud_to_prod:%s:http2:%s' % (prod_server, test_case) %>
137 ${fill_one_http2_test_result(shortname, resultset)}
138 % endfor
Adele Zhou3bc7ba42015-11-05 10:21:58 -0800139 % endif
140 </tr>
141 % endfor
142 </table>
143% endif
144
145% if server_langs:
146 % for test_case in test_cases:
147 ## Each column header is the client language.
148 <h2>${test_case}</h2>
149 <table style="width:100%" border="1">
150 <tr bgcolor="#00BFFF">
151 <th>Client languages &#9658;<br/>Server languages &#9660;</th>
152 % for client_lang in client_langs:
153 <th>${client_lang}</th>
154 % endfor
155 </tr>
156 ## Each row head is the server language.
157 % for server_lang in server_langs:
158 <tr>
159 <td><b>${server_lang}</b></td>
160 % for client_lang in client_langs:
161 <%
162 shortname = 'cloud_to_cloud:%s:%s_server:%s' % (
163 client_lang, server_lang, test_case)
164 %>
165 ${fill_one_test_result(shortname, resultset)}
166 % endfor
167 </tr>
168 % endfor
169 </table>
170 % endfor
171% endif
172
173<script>
174 $(document).ready(function(){$('[data-toggle="tooltip"]').tooltip();});
175</script>
176</body>
177</html>