<%def name="fill_one_test_result(shortname, resultset)">
% if shortname in resultset:
## 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] %>
% if result.state == 'PASSED':
PASS |
% else:
<%
tooltip = ''
if result.returncode > 0 or result.message:
if result.returncode > 0:
tooltip = 'returncode: %d ' % result.returncode
if result.message:
tooltip = '%smessage: %s' % (tooltip, result.message)
%>
% if result.state == 'FAILED':
% if tooltip:
FAIL |
% else:
FAIL
% endif
% elif result.state == 'TIMEOUT':
% if tooltip:
TIMEOUT |
% else:
TIMEOUT
% endif
% endif
% endif
% else:
Not implemented |
% endif
%def>
<%def name="fill_one_http2_test_result(shortname, resultset)">
## keep this mostly in sync with the template above
% if shortname in resultset:
## 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] %>
% if result.http2results:
${int(result.http2results['percent'] * 100)}%
|
% else:
No result is found! |
% endif
% else:
Not implemented |
% endif
%def>
<%def name="display_cloud_to_prod_result(prod_server)">
## Each column header is the client language.
Client languages ► Test Cases ▼ |
% for client_lang in client_langs:
${client_lang} |
% endfor
% for test_case in test_cases + auth_test_cases:
${test_case} |
% for client_lang in client_langs:
<%
if test_case in auth_test_cases:
shortname = 'cloud_to_prod_auth:%s:%s:%s' % (
prod_server, client_lang, test_case)
else:
shortname = 'cloud_to_prod:%s:%s:%s' % (
prod_server, client_lang, test_case)
%>
${fill_one_test_result(shortname, resultset)}
% endfor
% endfor
%def>
% if num_failures > 1:
${num_failures} tests failed!
% elif num_failures:
${num_failures} test failed!
% else:
All tests passed!
% endif
% if cloud_to_prod:
% for prod_server in prod_servers:
Cloud to ${prod_server}
${display_cloud_to_prod_result(prod_server)}
% endfor
% endif
% if http2_server_cases:
HTTP/2 Server Tests
## Each column header is the client language.
Client languages ► Test Cases ▼ |
% for client_lang in client_langs:
${client_lang} |
% endfor
% for test_case in http2_server_cases:
${test_case} |
% for client_lang in client_langs:
<%
shortname = 'cloud_to_cloud:%s:http2_server:%s' % (client_lang,
test_case)
%>
${fill_one_test_result(shortname, resultset)}
% endfor
% endfor
% endif
% if http2_interop:
## Each column header is the server language.
HTTP/2 Interop
Servers ► Test Cases ▼ |
% for server_lang in server_langs:
${server_lang} |
% endfor
% if cloud_to_prod:
% for prod_server in prod_servers:
${prod_server} |
% endfor
% endif
% for test_case in http2_cases:
${test_case} |
## Fill up the cells with test result.
% for server_lang in server_langs:
<%
shortname = 'cloud_to_cloud:http2:%s_server:%s' % (
server_lang, test_case)
%>
${fill_one_http2_test_result(shortname, resultset)}
% endfor
% if cloud_to_prod:
% for prod_server in prod_servers:
<% shortname = 'cloud_to_prod:%s:http2:%s' % (prod_server, test_case) %>
${fill_one_http2_test_result(shortname, resultset)}
% endfor
% endif
% endfor
% endif
% if server_langs:
% for test_case in test_cases:
## Each column header is the client language.
${test_case}
Client languages ► Server languages ▼ |
% for client_lang in client_langs:
${client_lang} |
% endfor
## Each row head is the server language.
% for server_lang in server_langs:
${server_lang} |
% for client_lang in client_langs:
<%
shortname = 'cloud_to_cloud:%s:%s_server:%s' % (
client_lang, server_lang, test_case)
%>
${fill_one_test_result(shortname, resultset)}
% endfor
% endfor
% endfor
% endif