Adele Zhou | 3bc7ba4 | 2015-11-05 10:21:58 -0800 | [diff] [blame] | 1 | <!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 Mastrangelo | e7f8e8e | 2015-12-08 17:22:44 -0800 | [diff] [blame] | 43 | <%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 Zhou | d63e90d | 2016-02-01 15:19:34 -0800 | [diff] [blame] | 49 | % 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)}%</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 Mastrangelo | e7f8e8e | 2015-12-08 17:22:44 -0800 | [diff] [blame] | 62 | % else: |
| 63 | <td bgcolor="magenta">Not implemented</td> |
| 64 | % endif |
| 65 | </%def> |
| 66 | |
Adele Zhou | b9e66cc | 2016-02-03 13:12:23 -0800 | [diff] [blame] | 67 | <%def name="display_cloud_to_prod_result(prod_server)"> |
Adele Zhou | 3bc7ba4 | 2015-11-05 10:21:58 -0800 | [diff] [blame] | 68 | ## Each column header is the client language. |
Adele Zhou | 3bc7ba4 | 2015-11-05 10:21:58 -0800 | [diff] [blame] | 69 | <table style="width:100%" border="1"> |
| 70 | <tr bgcolor="#00BFFF"> |
| 71 | <th>Client languages ►<br/>Test Cases ▼</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 Zhou | b9e66cc | 2016-02-03 13:12:23 -0800 | [diff] [blame] | 81 | shortname = 'cloud_to_prod_auth:%s:%s:%s' % ( |
| 82 | prod_server, client_lang, test_case) |
Adele Zhou | 3bc7ba4 | 2015-11-05 10:21:58 -0800 | [diff] [blame] | 83 | else: |
Adele Zhou | b9e66cc | 2016-02-03 13:12:23 -0800 | [diff] [blame] | 84 | shortname = 'cloud_to_prod:%s:%s:%s' % ( |
| 85 | prod_server, client_lang, test_case) |
Adele Zhou | 3bc7ba4 | 2015-11-05 10:21:58 -0800 | [diff] [blame] | 86 | %> |
| 87 | ${fill_one_test_result(shortname, resultset)} |
| 88 | % endfor |
| 89 | </tr> |
| 90 | % endfor |
| 91 | </table> |
Adele Zhou | b9e66cc | 2016-02-03 13:12:23 -0800 | [diff] [blame] | 92 | </%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 Zhou | 3bc7ba4 | 2015-11-05 10:21:58 -0800 | [diff] [blame] | 107 | % endif |
| 108 | |
Alexander Polcyn | 50fdc8a | 2017-02-09 21:06:08 -0800 | [diff] [blame] | 109 | % if http2_server_cases: |
| 110 | <h2>HTTP/2 Server Tests</h2> |
Adele Zhou | 429e560 | 2017-02-06 14:57:56 -0800 | [diff] [blame] | 111 | ## Each column header is the client language. |
| 112 | <table style="width:100%" border="1"> |
| 113 | <tr bgcolor="#00BFFF"> |
| 114 | <th>Client languages ►<br/>Test Cases ▼</th> |
Alexander Polcyn | 50fdc8a | 2017-02-09 21:06:08 -0800 | [diff] [blame] | 115 | % for client_lang in client_langs: |
Adele Zhou | 429e560 | 2017-02-06 14:57:56 -0800 | [diff] [blame] | 116 | <th>${client_lang}</th> |
| 117 | % endfor |
| 118 | </tr> |
Alexander Polcyn | 50fdc8a | 2017-02-09 21:06:08 -0800 | [diff] [blame] | 119 | % for test_case in http2_server_cases: |
Adele Zhou | 429e560 | 2017-02-06 14:57:56 -0800 | [diff] [blame] | 120 | <tr><td><b>${test_case}</b></td> |
Alexander Polcyn | 50fdc8a | 2017-02-09 21:06:08 -0800 | [diff] [blame] | 121 | % for client_lang in client_langs: |
Adele Zhou | 429e560 | 2017-02-06 14:57:56 -0800 | [diff] [blame] | 122 | <% |
| 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 Zhou | 3bc7ba4 | 2015-11-05 10:21:58 -0800 | [diff] [blame] | 133 | % 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 ►<br/>Test Cases ▼</th> |
| 139 | % for server_lang in server_langs: |
| 140 | <th>${server_lang}</th> |
| 141 | % endfor |
| 142 | % if cloud_to_prod: |
Adele Zhou | b9e66cc | 2016-02-03 13:12:23 -0800 | [diff] [blame] | 143 | % for prod_server in prod_servers: |
| 144 | <th>${prod_server}</th> |
| 145 | % endfor |
Adele Zhou | 3bc7ba4 | 2015-11-05 10:21:58 -0800 | [diff] [blame] | 146 | % 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 Mastrangelo | e7f8e8e | 2015-12-08 17:22:44 -0800 | [diff] [blame] | 156 | ${fill_one_http2_test_result(shortname, resultset)} |
Adele Zhou | 3bc7ba4 | 2015-11-05 10:21:58 -0800 | [diff] [blame] | 157 | % endfor |
| 158 | % if cloud_to_prod: |
Adele Zhou | b9e66cc | 2016-02-03 13:12:23 -0800 | [diff] [blame] | 159 | % 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 Zhou | 3bc7ba4 | 2015-11-05 10:21:58 -0800 | [diff] [blame] | 163 | % 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 ►<br/>Server languages ▼</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> |