diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/doxygen/Doxyfile.core.internal | 2 | ||||
-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 | 18 | ||||
-rw-r--r-- | tools/run_tests/tests.json | 18 |
7 files changed, 191 insertions, 20 deletions
diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index e441d9e695..b998a38ebb 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -790,7 +790,6 @@ src/core/channel/connected_channel.h \ src/core/channel/context.h \ src/core/channel/http_client_filter.h \ src/core/channel/http_server_filter.h \ -src/core/channel/noop_filter.h \ src/core/channel/subchannel_call_holder.h \ src/core/client_config/client_config.h \ src/core/client_config/connector.h \ @@ -928,7 +927,6 @@ src/core/channel/compress_filter.c \ src/core/channel/connected_channel.c \ src/core/channel/http_client_filter.c \ src/core/channel/http_server_filter.c \ -src/core/channel/noop_filter.c \ src/core/channel/subchannel_call_holder.c \ src/core/client_config/client_config.c \ src/core/client_config/connector.c \ 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 5be63bbe2b..af94a1a38d 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -4,6 +4,18 @@ { "deps": [ "gpr", + "gpr_test_util" + ], + "headers": [], + "language": "c", + "name": "alloc_test", + "src": [ + "test/core/support/alloc_test.c" + ] + }, + { + "deps": [ + "gpr", "gpr_test_util", "grpc", "grpc_test_util" @@ -14475,7 +14487,6 @@ "src/core/channel/context.h", "src/core/channel/http_client_filter.h", "src/core/channel/http_server_filter.h", - "src/core/channel/noop_filter.h", "src/core/channel/subchannel_call_holder.h", "src/core/client_config/client_config.h", "src/core/client_config/connector.h", @@ -14630,8 +14641,6 @@ "src/core/channel/http_client_filter.h", "src/core/channel/http_server_filter.c", "src/core/channel/http_server_filter.h", - "src/core/channel/noop_filter.c", - "src/core/channel/noop_filter.h", "src/core/channel/subchannel_call_holder.c", "src/core/channel/subchannel_call_holder.h", "src/core/client_config/client_config.c", @@ -14987,7 +14996,6 @@ "src/core/channel/context.h", "src/core/channel/http_client_filter.h", "src/core/channel/http_server_filter.h", - "src/core/channel/noop_filter.h", "src/core/channel/subchannel_call_holder.h", "src/core/client_config/client_config.h", "src/core/client_config/connector.h", @@ -15128,8 +15136,6 @@ "src/core/channel/http_client_filter.h", "src/core/channel/http_server_filter.c", "src/core/channel/http_server_filter.h", - "src/core/channel/noop_filter.c", - "src/core/channel/noop_filter.h", "src/core/channel/subchannel_call_holder.c", "src/core/channel/subchannel_call_holder.h", "src/core/client_config/client_config.c", diff --git a/tools/run_tests/tests.json b/tools/run_tests/tests.json index 841dc9ca38..6ec1955cff 100644 --- a/tools/run_tests/tests.json +++ b/tools/run_tests/tests.json @@ -11,6 +11,24 @@ "exclude_configs": [], "flaky": false, "language": "c", + "name": "alloc_test", + "platforms": [ + "linux", + "mac", + "posix", + "windows" + ] + }, + { + "ci_platforms": [ + "linux", + "mac", + "posix", + "windows" + ], + "exclude_configs": [], + "flaky": false, + "language": "c", "name": "alpn_test", "platforms": [ "linux", |