OLD | NEW |
(Empty) | |
| 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="${toolt
ip | 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="${toolt
ip | 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 |
| 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] %> |
| 49 % if result.http2results: |
| 50 <td bgcolor="white"> |
| 51 <div style="width:95%; border: 1px solid black; position: relative; padd
ing: 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 |
| 62 % else: |
| 63 <td bgcolor="magenta">Not implemented</td> |
| 64 % endif |
| 65 </%def> |
| 66 |
| 67 <%def name="display_cloud_to_prod_result(prod_server)"> |
| 68 ## Each column header is the client language. |
| 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: |
| 81 shortname = 'cloud_to_prod_auth:%s:%s:%s' % ( |
| 82 prod_server, client_lang, test_case) |
| 83 else: |
| 84 shortname = 'cloud_to_prod:%s:%s:%s' % ( |
| 85 prod_server, client_lang, test_case) |
| 86 %> |
| 87 ${fill_one_test_result(shortname, resultset)} |
| 88 % endfor |
| 89 </tr> |
| 90 % endfor |
| 91 </table> |
| 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 |
| 107 % 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 ►<br/>Test Cases ▼</th> |
| 115 % for server_lang in server_langs: |
| 116 <th>${server_lang}</th> |
| 117 % endfor |
| 118 % if cloud_to_prod: |
| 119 % for prod_server in prod_servers: |
| 120 <th>${prod_server}</th> |
| 121 % endfor |
| 122 % 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 %> |
| 132 ${fill_one_http2_test_result(shortname, resultset)} |
| 133 % endfor |
| 134 % if cloud_to_prod: |
| 135 % 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 |
| 139 % 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 ►<br/>Server languages ▼</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> |
OLD | NEW |