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