diff options
Diffstat (limited to 'test/core/end2end/gen_build_json.py')
-rwxr-xr-x | test/core/end2end/gen_build_json.py | 54 |
1 files changed, 33 insertions, 21 deletions
diff --git a/test/core/end2end/gen_build_json.py b/test/core/end2end/gen_build_json.py index 8b0dd3166b..d66442545f 100755 --- a/test/core/end2end/gen_build_json.py +++ b/test/core/end2end/gen_build_json.py @@ -36,38 +36,42 @@ import simplejson import collections -FixtureOptions = collections.namedtuple('FixtureOptions', 'secure platforms') -default_unsecure_fixture_options = FixtureOptions(False, ['windows', 'posix']) -default_secure_fixture_options = FixtureOptions(True, ['windows', 'posix']) +FixtureOptions = collections.namedtuple('FixtureOptions', 'fullstack secure platforms') +default_unsecure_fixture_options = FixtureOptions(True, False, ['windows', 'posix']) +socketpair_unsecure_fixture_options = FixtureOptions(False, False, ['windows', 'posix']) +default_secure_fixture_options = FixtureOptions(True, True, ['windows', 'posix']) # maps fixture name to whether it requires the security library END2END_FIXTURES = { 'chttp2_fake_security': default_secure_fixture_options, - 'chttp2_fullstack': default_unsecure_fixture_options, 'chttp2_fullstack_compression': default_unsecure_fixture_options, - 'chttp2_fullstack_with_poll': FixtureOptions(False, ['posix']), - 'chttp2_fullstack_uds_posix': FixtureOptions(False, ['posix']), + 'chttp2_fullstack': default_unsecure_fixture_options, + 'chttp2_fullstack_uds_posix': FixtureOptions(True, False, ['posix']), + 'chttp2_fullstack_uds_posix_with_poll': FixtureOptions(True, False, ['posix']), + 'chttp2_fullstack_with_poll': FixtureOptions(True, False, ['posix']), 'chttp2_simple_ssl_fullstack': default_secure_fixture_options, - 'chttp2_simple_ssl_fullstack_with_poll': FixtureOptions(True, ['posix']), + 'chttp2_simple_ssl_fullstack_with_poll': FixtureOptions(True, True, ['posix']), 'chttp2_simple_ssl_with_oauth2_fullstack': default_secure_fixture_options, - 'chttp2_socket_pair': default_unsecure_fixture_options, - 'chttp2_socket_pair_one_byte_at_a_time': default_unsecure_fixture_options, - 'chttp2_socket_pair_with_grpc_trace': default_unsecure_fixture_options, + 'chttp2_socket_pair_one_byte_at_a_time': socketpair_unsecure_fixture_options, + 'chttp2_socket_pair': socketpair_unsecure_fixture_options, + 'chttp2_socket_pair_with_grpc_trace': socketpair_unsecure_fixture_options, } -TestOptions = collections.namedtuple('TestOptions', 'flaky secure') -default_test_options = TestOptions(False, False) +TestOptions = collections.namedtuple('TestOptions', 'needs_fullstack flaky secure') +default_test_options = TestOptions(False, False, False) +connectivity_test_options = TestOptions(True, False, False) # maps test names to options END2END_TESTS = { 'bad_hostname': default_test_options, - 'cancel_after_accept': default_test_options, 'cancel_after_accept_and_writes_closed': default_test_options, + 'cancel_after_accept': default_test_options, 'cancel_after_invoke': default_test_options, 'cancel_before_invoke': default_test_options, 'cancel_in_a_vacuum': default_test_options, 'census_simple_request': default_test_options, - 'disappearing_server': default_test_options, + 'channel_connectivity': connectivity_test_options, + 'disappearing_server': connectivity_test_options, 'early_server_shutdown_finishes_inflight_calls': default_test_options, 'early_server_shutdown_finishes_tags': default_test_options, 'empty_batch': default_test_options, @@ -79,21 +83,28 @@ END2END_TESTS = { 'ping_pong_streaming': default_test_options, 'registered_call': default_test_options, 'request_response_with_binary_metadata_and_payload': default_test_options, - 'request_response_with_trailing_metadata_and_payload': default_test_options, 'request_response_with_metadata_and_payload': default_test_options, + 'request_response_with_payload_and_call_creds': TestOptions(needs_fullstack=False, flaky=False, secure=True), 'request_response_with_payload': default_test_options, - 'request_response_with_payload_and_call_creds': TestOptions(flaky=False, secure=True), - 'request_with_large_metadata': default_test_options, - 'request_with_payload': default_test_options, + 'request_response_with_trailing_metadata_and_payload': default_test_options, 'request_with_compressed_payload': default_test_options, 'request_with_flags': default_test_options, + 'request_with_large_metadata': default_test_options, + 'request_with_payload': default_test_options, 'server_finishes_request': default_test_options, - 'simple_delayed_request': default_test_options, + 'simple_delayed_request': connectivity_test_options, 'simple_request': default_test_options, 'simple_request_with_high_initial_sequence_number': default_test_options, } +def compatible(f, t): + if END2END_TESTS[t].needs_fullstack: + if not END2END_FIXTURES[f].fullstack: + return False + return True + + def main(): sec_deps = [ 'end2end_certs', @@ -157,7 +168,8 @@ def main(): 'end2end_test_%s' % t] + sec_deps } for f in sorted(END2END_FIXTURES.keys()) - for t in sorted(END2END_TESTS.keys())] + [ + for t in sorted(END2END_TESTS.keys()) + if compatible(f, t)] + [ { 'name': '%s_%s_unsecure_test' % (f, t), 'build': 'test', @@ -171,7 +183,7 @@ def main(): 'end2end_test_%s' % t] + unsec_deps } for f in sorted(END2END_FIXTURES.keys()) if not END2END_FIXTURES[f].secure - for t in sorted(END2END_TESTS.keys()) if not END2END_TESTS[t].secure]} + for t in sorted(END2END_TESTS.keys()) if compatible(f, t) and not END2END_TESTS[t].secure]} print simplejson.dumps(json, sort_keys=True, indent=2 * ' ') |