diff options
author | David Garcia Quintas <dgq@google.com> | 2015-12-09 14:20:38 -0800 |
---|---|---|
committer | David Garcia Quintas <dgq@google.com> | 2015-12-09 14:20:38 -0800 |
commit | 3ff5d2dd6be6496db1ae45fd957747a5a5c2181b (patch) | |
tree | aaa379c043cbe6fdc36e6107bceddad0fc9e2f78 /tools | |
parent | a5aa19b8b6c8ce2c2ce9baa8b0108e91b9c330b1 (diff) | |
parent | 3ca448925ba3df03ef872ac127b5e70ccd35c1af (diff) |
Merge branch 'master' of github.com:grpc/grpc into custom_allocs
Diffstat (limited to 'tools')
-rw-r--r-- | tools/jenkins/grpc_interop_php/Dockerfile | 14 | ||||
-rwxr-xr-x | tools/jenkins/grpc_interop_php/build_interop.sh | 10 | ||||
-rw-r--r-- | tools/run_tests/interop_html_report.template | 141 | ||||
-rw-r--r-- | tools/run_tests/report_utils.py | 8 | ||||
-rw-r--r-- | tools/run_tests/sources_and_headers.json | 14 | ||||
-rw-r--r-- | tools/run_tests/tests.json | 18 |
6 files changed, 193 insertions, 12 deletions
diff --git a/tools/jenkins/grpc_interop_php/Dockerfile b/tools/jenkins/grpc_interop_php/Dockerfile index 09da713691..492d20cdb5 100644 --- a/tools/jenkins/grpc_interop_php/Dockerfile +++ b/tools/jenkins/grpc_interop_php/Dockerfile @@ -100,5 +100,19 @@ RUN /bin/bash -l -c "rvm all do gem install ronn rake" RUN curl -sS https://getcomposer.org/installer | php RUN mv composer.phar /usr/local/bin/composer +# Download the patched PHP protobuf so that PHP gRPC clients can be generated +# from proto3 schemas. +RUN git clone https://github.com/stanley-cheung/Protobuf-PHP.git /var/local/git/protobuf-php + +RUN /bin/bash -l -c "rvm use ruby-2.1 \ + && cd /var/local/git/protobuf-php \ + && rvm all do rake pear:package version=1.0 \ + && pear install Protobuf-1.0.tgz" + +# As an attempt to work around #4212, try to prefetch Protobuf-PHP dependency +# into composer cache to prevent "composer install" from cloning on each build. +RUN git clone --mirror https://github.com/stanley-cheung/Protobuf-PHP.git \ + /root/.composer/cache/vcs/git-github.com-stanley-cheung-Protobuf-PHP.git/ + # Define the default command. CMD ["bash"] diff --git a/tools/jenkins/grpc_interop_php/build_interop.sh b/tools/jenkins/grpc_interop_php/build_interop.sh index cd9d67804a..87262f1d62 100755 --- a/tools/jenkins/grpc_interop_php/build_interop.sh +++ b/tools/jenkins/grpc_interop_php/build_interop.sh @@ -29,7 +29,7 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # # Builds PHP interop server and client in a base image. -set -e +set -ex mkdir -p /var/local/git git clone --recursive /var/local/jenkins/grpc /var/local/git/grpc @@ -45,18 +45,10 @@ make install-certs # gRPC core and protobuf need to be installed make install -# Download the patched PHP protobuf so that PHP gRPC clients can be generated -# from proto3 schemas. -git clone https://github.com/stanley-cheung/Protobuf-PHP.git /var/local/git/protobuf-php - (cd src/php/ext/grpc && phpize && ./configure && make) (cd third_party/protobuf && make install) -(cd /var/local/git/protobuf-php \ - && rvm all do rake pear:package version=1.0 \ - && pear install Protobuf-1.0.tgz) - (cd src/php && composer install) (cd src/php && protoc-gen-php -i tests/interop/ -o tests/interop/ tests/interop/test.proto) diff --git a/tools/run_tests/interop_html_report.template b/tools/run_tests/interop_html_report.template new file mode 100644 index 0000000000..1ba2e6cfc2 --- /dev/null +++ b/tools/run_tests/interop_html_report.template @@ -0,0 +1,141 @@ +<!DOCTYPE html> +<html lang="en"> +<head><title>Interop Test Result</title></head> +<body> + +<%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': + <td bgcolor="green">PASS</td> + % 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': + <td bgcolor="red"> + % if tooltip: + <a href="#" data-toggle="tooltip" data-placement="auto" title="${tooltip | h}">FAIL</a></td> + % else: + FAIL</td> + % endif + % elif result.state == 'TIMEOUT': + <td bgcolor="yellow"> + % if tooltip: + <a href="#" data-toggle="tooltip" data-placement="auto" title="${tooltip | h}">TIMEOUT</a></td> + % else: + TIMEOUT</td> + % endif + % endif + % endif + % else: + <td bgcolor="magenta">Not implemented</td> + % endif +</%def> + +% if num_failures > 1: + <p><h2><font color="red">${num_failures} tests failed!</font></h2></p> +% elif num_failures: + <p><h2><font color="red">${num_failures} test failed!</font></h2></p> +% else: + <p><h2><font color="green">All tests passed!</font></h2></p> +% endif + +% if cloud_to_prod: + ## Each column header is the client language. + <h2>Cloud to Prod</h2> + <table style="width:100%" border="1"> + <tr bgcolor="#00BFFF"> + <th>Client languages ►<br/>Test Cases ▼</th> + % for client_lang in client_langs: + <th>${client_lang}</th> + % endfor + </tr> + % for test_case in test_cases + auth_test_cases: + <tr><td><b>${test_case}</b></td> + % for client_lang in client_langs: + <% + if test_case in auth_test_cases: + shortname = 'cloud_to_prod_auth:%s:%s' % (client_lang, test_case) + else: + shortname = 'cloud_to_prod:%s:%s' % (client_lang, test_case) + %> + ${fill_one_test_result(shortname, resultset)} + % endfor + </tr> + % endfor + </table> +% endif + +% if http2_interop: + ## Each column header is the server language. + <h2>HTTP/2 Interop</h2> + <table style="width:100%" border="1"> + <tr bgcolor="#00BFFF"> + <th>Servers ►<br/>Test Cases ▼</th> + % for server_lang in server_langs: + <th>${server_lang}</th> + % endfor + % if cloud_to_prod: + <th>prod</th> + % endif + </tr> + % for test_case in http2_cases: + <tr><td><b>${test_case}</b></td> + ## 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_test_result(shortname, resultset)} + % endfor + % if cloud_to_prod: + <% shortname = 'cloud_to_prod:http2:%s' % test_case %> + ${fill_one_test_result(shortname, resultset)} + % endif + </tr> + % endfor + </table> +% endif + +% if server_langs: + % for test_case in test_cases: + ## Each column header is the client language. + <h2>${test_case}</h2> + <table style="width:100%" border="1"> + <tr bgcolor="#00BFFF"> + <th>Client languages ►<br/>Server languages ▼</th> + % for client_lang in client_langs: + <th>${client_lang}</th> + % endfor + </tr> + ## Each row head is the server language. + % for server_lang in server_langs: + <tr> + <td><b>${server_lang}</b></td> + % 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 + </tr> + % endfor + </table> + % endfor +% endif + +<script> + $(document).ready(function(){$('[data-toggle="tooltip"]').tooltip();}); +</script> +</body> +</html> diff --git a/tools/run_tests/report_utils.py b/tools/run_tests/report_utils.py index adeb707a07..12b1972f1a 100644 --- a/tools/run_tests/report_utils.py +++ b/tools/run_tests/report_utils.py @@ -78,8 +78,7 @@ def render_interop_html_report( client_langs, server_langs, test_cases, auth_test_cases, http2_cases, resultset, num_failures, cloud_to_prod, http2_interop): """Generate HTML report for interop tests.""" - html_report_dir = 'reports' - template_file = os.path.join(html_report_dir, 'interop_html_report.template') + template_file = 'tools/run_tests/interop_html_report.template' try: mytemplate = Template(filename=template_file, format_exceptions=True) except NameError: @@ -104,6 +103,9 @@ def render_interop_html_report( 'num_failures': num_failures, 'cloud_to_prod': cloud_to_prod, 'http2_interop': http2_interop} - html_file_path = os.path.join(html_report_dir, 'index.html') + html_report_out_dir = 'reports' + if not os.path.exists(html_report_out_dir): + os.mkdir(html_report_out_dir) + html_file_path = os.path.join(html_report_out_dir, 'index.html') with open(html_file_path, 'w') as output_file: mytemplate.render_context(Context(output_file, **args)) diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index d1f6c14dee..56f74a9c99 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -597,6 +597,20 @@ ], "headers": [], "language": "c", + "name": "grpc_invalid_channel_args_test", + "src": [ + "test/core/surface/invalid_channel_args_test.c" + ] + }, + { + "deps": [ + "gpr", + "gpr_test_util", + "grpc", + "grpc_test_util" + ], + "headers": [], + "language": "c", "name": "grpc_json_token_test", "src": [ "test/core/security/json_token_test.c" diff --git a/tools/run_tests/tests.json b/tools/run_tests/tests.json index c4378fe338..f579a2d518 100644 --- a/tools/run_tests/tests.json +++ b/tools/run_tests/tests.json @@ -697,6 +697,24 @@ "ci_platforms": [ "linux", "mac", + "posix", + "windows" + ], + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "grpc_invalid_channel_args_test", + "platforms": [ + "linux", + "mac", + "posix", + "windows" + ] + }, + { + "ci_platforms": [ + "linux", + "mac", "posix" ], "exclude_configs": [], |