Craig Tiller | 0fe5ee7 | 2015-12-22 12:50:36 -0800 | [diff] [blame] | 1 | |
Craig Tiller | 0fe5ee7 | 2015-12-22 12:50:36 -0800 | [diff] [blame] | 2 | /* |
| 3 | * |
Craig Tiller | c506e24 | 2016-01-04 15:59:29 -0800 | [diff] [blame] | 4 | * Copyright 2015-2016, Google Inc. |
Craig Tiller | 0fe5ee7 | 2015-12-22 12:50:36 -0800 | [diff] [blame] | 5 | * All rights reserved. |
| 6 | * |
| 7 | * Redistribution and use in source and binary forms, with or without |
| 8 | * modification, are permitted provided that the following conditions are |
| 9 | * met: |
| 10 | * |
| 11 | * * Redistributions of source code must retain the above copyright |
| 12 | * notice, this list of conditions and the following disclaimer. |
| 13 | * * Redistributions in binary form must reproduce the above |
| 14 | * copyright notice, this list of conditions and the following disclaimer |
| 15 | * in the documentation and/or other materials provided with the |
| 16 | * distribution. |
| 17 | * * Neither the name of Google Inc. nor the names of its |
| 18 | * contributors may be used to endorse or promote products derived from |
| 19 | * this software without specific prior written permission. |
| 20 | * |
| 21 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
| 22 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
| 23 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
| 24 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
| 25 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
| 26 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
| 27 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 28 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 29 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 30 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 31 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 32 | * |
| 33 | */ |
| 34 | |
Craig Tiller | 0fe5ee7 | 2015-12-22 12:50:36 -0800 | [diff] [blame] | 35 | /* This file is auto-generated */ |
| 36 | |
Craig Tiller | f40df23 | 2016-03-25 13:38:14 -0700 | [diff] [blame] | 37 | #include "test/core/end2end/end2end_tests.h" |
Craig Tiller | 0fe5ee7 | 2015-12-22 12:50:36 -0800 | [diff] [blame] | 38 | |
Craig Tiller | d1fce83 | 2016-03-21 15:33:47 -0700 | [diff] [blame^] | 39 | #include <string.h> |
| 40 | |
| 41 | #include <grpc/support/log.h> |
| 42 | |
Craig Tiller | 0fe5ee7 | 2015-12-22 12:50:36 -0800 | [diff] [blame] | 43 | extern void bad_hostname(grpc_end2end_test_config config); |
| 44 | extern void binary_metadata(grpc_end2end_test_config config); |
| 45 | extern void cancel_after_accept(grpc_end2end_test_config config); |
| 46 | extern void cancel_after_client_done(grpc_end2end_test_config config); |
| 47 | extern void cancel_after_invoke(grpc_end2end_test_config config); |
| 48 | extern void cancel_before_invoke(grpc_end2end_test_config config); |
| 49 | extern void cancel_in_a_vacuum(grpc_end2end_test_config config); |
| 50 | extern void cancel_with_status(grpc_end2end_test_config config); |
Craig Tiller | 0fe5ee7 | 2015-12-22 12:50:36 -0800 | [diff] [blame] | 51 | extern void compressed_payload(grpc_end2end_test_config config); |
Craig Tiller | 521423c | 2016-02-22 22:22:22 -0800 | [diff] [blame] | 52 | extern void connectivity(grpc_end2end_test_config config); |
Craig Tiller | 0fe5ee7 | 2015-12-22 12:50:36 -0800 | [diff] [blame] | 53 | extern void default_host(grpc_end2end_test_config config); |
| 54 | extern void disappearing_server(grpc_end2end_test_config config); |
| 55 | extern void empty_batch(grpc_end2end_test_config config); |
| 56 | extern void graceful_server_shutdown(grpc_end2end_test_config config); |
| 57 | extern void high_initial_seqno(grpc_end2end_test_config config); |
| 58 | extern void hpack_size(grpc_end2end_test_config config); |
| 59 | extern void invoke_large_request(grpc_end2end_test_config config); |
| 60 | extern void large_metadata(grpc_end2end_test_config config); |
| 61 | extern void max_concurrent_streams(grpc_end2end_test_config config); |
| 62 | extern void max_message_length(grpc_end2end_test_config config); |
Craig Tiller | 0fe5ee7 | 2015-12-22 12:50:36 -0800 | [diff] [blame] | 63 | extern void negative_deadline(grpc_end2end_test_config config); |
| 64 | extern void no_op(grpc_end2end_test_config config); |
| 65 | extern void payload(grpc_end2end_test_config config); |
Craig Tiller | 521423c | 2016-02-22 22:22:22 -0800 | [diff] [blame] | 66 | extern void ping(grpc_end2end_test_config config); |
Craig Tiller | 0fe5ee7 | 2015-12-22 12:50:36 -0800 | [diff] [blame] | 67 | extern void ping_pong_streaming(grpc_end2end_test_config config); |
| 68 | extern void registered_call(grpc_end2end_test_config config); |
| 69 | extern void request_with_flags(grpc_end2end_test_config config); |
| 70 | extern void request_with_payload(grpc_end2end_test_config config); |
| 71 | extern void server_finishes_request(grpc_end2end_test_config config); |
| 72 | extern void shutdown_finishes_calls(grpc_end2end_test_config config); |
| 73 | extern void shutdown_finishes_tags(grpc_end2end_test_config config); |
| 74 | extern void simple_delayed_request(grpc_end2end_test_config config); |
Craig Tiller | 521423c | 2016-02-22 22:22:22 -0800 | [diff] [blame] | 75 | extern void simple_metadata(grpc_end2end_test_config config); |
Craig Tiller | 0fe5ee7 | 2015-12-22 12:50:36 -0800 | [diff] [blame] | 76 | extern void simple_request(grpc_end2end_test_config config); |
| 77 | extern void trailing_metadata(grpc_end2end_test_config config); |
| 78 | |
Craig Tiller | be52c6e | 2016-01-04 15:35:26 -0800 | [diff] [blame] | 79 | void grpc_end2end_tests(int argc, char **argv, |
| 80 | grpc_end2end_test_config config) { |
Craig Tiller | 0fe5ee7 | 2015-12-22 12:50:36 -0800 | [diff] [blame] | 81 | int i; |
| 82 | |
| 83 | if (argc <= 1) { |
| 84 | bad_hostname(config); |
| 85 | binary_metadata(config); |
| 86 | cancel_after_accept(config); |
| 87 | cancel_after_client_done(config); |
| 88 | cancel_after_invoke(config); |
| 89 | cancel_before_invoke(config); |
| 90 | cancel_in_a_vacuum(config); |
| 91 | cancel_with_status(config); |
Craig Tiller | 0fe5ee7 | 2015-12-22 12:50:36 -0800 | [diff] [blame] | 92 | compressed_payload(config); |
Craig Tiller | 521423c | 2016-02-22 22:22:22 -0800 | [diff] [blame] | 93 | connectivity(config); |
Craig Tiller | 0fe5ee7 | 2015-12-22 12:50:36 -0800 | [diff] [blame] | 94 | default_host(config); |
| 95 | disappearing_server(config); |
| 96 | empty_batch(config); |
| 97 | graceful_server_shutdown(config); |
| 98 | high_initial_seqno(config); |
| 99 | hpack_size(config); |
| 100 | invoke_large_request(config); |
| 101 | large_metadata(config); |
| 102 | max_concurrent_streams(config); |
| 103 | max_message_length(config); |
Craig Tiller | 0fe5ee7 | 2015-12-22 12:50:36 -0800 | [diff] [blame] | 104 | negative_deadline(config); |
| 105 | no_op(config); |
| 106 | payload(config); |
Craig Tiller | 521423c | 2016-02-22 22:22:22 -0800 | [diff] [blame] | 107 | ping(config); |
Craig Tiller | 0fe5ee7 | 2015-12-22 12:50:36 -0800 | [diff] [blame] | 108 | ping_pong_streaming(config); |
| 109 | registered_call(config); |
| 110 | request_with_flags(config); |
| 111 | request_with_payload(config); |
| 112 | server_finishes_request(config); |
| 113 | shutdown_finishes_calls(config); |
| 114 | shutdown_finishes_tags(config); |
| 115 | simple_delayed_request(config); |
Craig Tiller | 521423c | 2016-02-22 22:22:22 -0800 | [diff] [blame] | 116 | simple_metadata(config); |
Craig Tiller | 0fe5ee7 | 2015-12-22 12:50:36 -0800 | [diff] [blame] | 117 | simple_request(config); |
| 118 | trailing_metadata(config); |
| 119 | return; |
| 120 | } |
| 121 | |
| 122 | for (i = 1; i < argc; i++) { |
| 123 | if (0 == strcmp("bad_hostname", argv[i])) { |
| 124 | bad_hostname(config); |
| 125 | continue; |
| 126 | } |
| 127 | if (0 == strcmp("binary_metadata", argv[i])) { |
| 128 | binary_metadata(config); |
| 129 | continue; |
| 130 | } |
| 131 | if (0 == strcmp("cancel_after_accept", argv[i])) { |
| 132 | cancel_after_accept(config); |
| 133 | continue; |
| 134 | } |
| 135 | if (0 == strcmp("cancel_after_client_done", argv[i])) { |
| 136 | cancel_after_client_done(config); |
| 137 | continue; |
| 138 | } |
| 139 | if (0 == strcmp("cancel_after_invoke", argv[i])) { |
| 140 | cancel_after_invoke(config); |
| 141 | continue; |
| 142 | } |
| 143 | if (0 == strcmp("cancel_before_invoke", argv[i])) { |
| 144 | cancel_before_invoke(config); |
| 145 | continue; |
| 146 | } |
| 147 | if (0 == strcmp("cancel_in_a_vacuum", argv[i])) { |
| 148 | cancel_in_a_vacuum(config); |
| 149 | continue; |
| 150 | } |
| 151 | if (0 == strcmp("cancel_with_status", argv[i])) { |
| 152 | cancel_with_status(config); |
| 153 | continue; |
| 154 | } |
Craig Tiller | 0fe5ee7 | 2015-12-22 12:50:36 -0800 | [diff] [blame] | 155 | if (0 == strcmp("compressed_payload", argv[i])) { |
| 156 | compressed_payload(config); |
| 157 | continue; |
| 158 | } |
Craig Tiller | 521423c | 2016-02-22 22:22:22 -0800 | [diff] [blame] | 159 | if (0 == strcmp("connectivity", argv[i])) { |
| 160 | connectivity(config); |
| 161 | continue; |
| 162 | } |
Craig Tiller | 0fe5ee7 | 2015-12-22 12:50:36 -0800 | [diff] [blame] | 163 | if (0 == strcmp("default_host", argv[i])) { |
| 164 | default_host(config); |
| 165 | continue; |
| 166 | } |
| 167 | if (0 == strcmp("disappearing_server", argv[i])) { |
| 168 | disappearing_server(config); |
| 169 | continue; |
| 170 | } |
| 171 | if (0 == strcmp("empty_batch", argv[i])) { |
| 172 | empty_batch(config); |
| 173 | continue; |
| 174 | } |
| 175 | if (0 == strcmp("graceful_server_shutdown", argv[i])) { |
| 176 | graceful_server_shutdown(config); |
| 177 | continue; |
| 178 | } |
| 179 | if (0 == strcmp("high_initial_seqno", argv[i])) { |
| 180 | high_initial_seqno(config); |
| 181 | continue; |
| 182 | } |
| 183 | if (0 == strcmp("hpack_size", argv[i])) { |
| 184 | hpack_size(config); |
| 185 | continue; |
| 186 | } |
| 187 | if (0 == strcmp("invoke_large_request", argv[i])) { |
| 188 | invoke_large_request(config); |
| 189 | continue; |
| 190 | } |
| 191 | if (0 == strcmp("large_metadata", argv[i])) { |
| 192 | large_metadata(config); |
| 193 | continue; |
| 194 | } |
| 195 | if (0 == strcmp("max_concurrent_streams", argv[i])) { |
| 196 | max_concurrent_streams(config); |
| 197 | continue; |
| 198 | } |
| 199 | if (0 == strcmp("max_message_length", argv[i])) { |
| 200 | max_message_length(config); |
| 201 | continue; |
| 202 | } |
Craig Tiller | 0fe5ee7 | 2015-12-22 12:50:36 -0800 | [diff] [blame] | 203 | if (0 == strcmp("negative_deadline", argv[i])) { |
| 204 | negative_deadline(config); |
| 205 | continue; |
| 206 | } |
| 207 | if (0 == strcmp("no_op", argv[i])) { |
| 208 | no_op(config); |
| 209 | continue; |
| 210 | } |
| 211 | if (0 == strcmp("payload", argv[i])) { |
| 212 | payload(config); |
| 213 | continue; |
| 214 | } |
Craig Tiller | 521423c | 2016-02-22 22:22:22 -0800 | [diff] [blame] | 215 | if (0 == strcmp("ping", argv[i])) { |
| 216 | ping(config); |
| 217 | continue; |
| 218 | } |
Craig Tiller | 0fe5ee7 | 2015-12-22 12:50:36 -0800 | [diff] [blame] | 219 | if (0 == strcmp("ping_pong_streaming", argv[i])) { |
| 220 | ping_pong_streaming(config); |
| 221 | continue; |
| 222 | } |
| 223 | if (0 == strcmp("registered_call", argv[i])) { |
| 224 | registered_call(config); |
| 225 | continue; |
| 226 | } |
| 227 | if (0 == strcmp("request_with_flags", argv[i])) { |
| 228 | request_with_flags(config); |
| 229 | continue; |
| 230 | } |
| 231 | if (0 == strcmp("request_with_payload", argv[i])) { |
| 232 | request_with_payload(config); |
| 233 | continue; |
| 234 | } |
| 235 | if (0 == strcmp("server_finishes_request", argv[i])) { |
| 236 | server_finishes_request(config); |
| 237 | continue; |
| 238 | } |
| 239 | if (0 == strcmp("shutdown_finishes_calls", argv[i])) { |
| 240 | shutdown_finishes_calls(config); |
| 241 | continue; |
| 242 | } |
| 243 | if (0 == strcmp("shutdown_finishes_tags", argv[i])) { |
| 244 | shutdown_finishes_tags(config); |
| 245 | continue; |
| 246 | } |
| 247 | if (0 == strcmp("simple_delayed_request", argv[i])) { |
| 248 | simple_delayed_request(config); |
| 249 | continue; |
| 250 | } |
Craig Tiller | 521423c | 2016-02-22 22:22:22 -0800 | [diff] [blame] | 251 | if (0 == strcmp("simple_metadata", argv[i])) { |
| 252 | simple_metadata(config); |
| 253 | continue; |
| 254 | } |
Craig Tiller | 0fe5ee7 | 2015-12-22 12:50:36 -0800 | [diff] [blame] | 255 | if (0 == strcmp("simple_request", argv[i])) { |
| 256 | simple_request(config); |
| 257 | continue; |
| 258 | } |
| 259 | if (0 == strcmp("trailing_metadata", argv[i])) { |
| 260 | trailing_metadata(config); |
| 261 | continue; |
| 262 | } |
Craig Tiller | 093193e | 2016-01-07 07:14:44 -0800 | [diff] [blame] | 263 | gpr_log(GPR_DEBUG, "not a test: '%s'", argv[i]); |
Craig Tiller | 0fe5ee7 | 2015-12-22 12:50:36 -0800 | [diff] [blame] | 264 | abort(); |
| 265 | } |
| 266 | } |