diff --git a/BUILD b/BUILD index a0320bc5bf00639fd8c12ee50e71270786b09266..eeca0641895afa3f2316bff4065b463c9135057c 100644 --- a/BUILD +++ b/BUILD @@ -537,11 +537,13 @@ grpc_cc_library( "include/grpc/grpc_security.h", "include/grpc/census.h", ], + external_deps = [ + "libssl", + "zlib", + "nanopb", + ], deps = [ - "//external:libssl", - "//external:zlib", ":gpr", - "//external:nanopb", ], language = "C", ) @@ -690,9 +692,11 @@ grpc_cc_library( "include/grpc/impl/codegen/sync_posix.h", "include/grpc/impl/codegen/sync_windows.h", ], + external_deps = [ + "libssl", + "protobuf_clib", + ], deps = [ - "//external:libssl", - "//external:protobuf_clib", ":grpc", ], ) diff --git a/grpc-build-system.bzl b/grpc-build-system.bzl index c1a61efd123877282fd58ed264c71dfe38e4ff5c..393aa42ca039c52d066daac1201acedda43790d9 100644 --- a/grpc-build-system.bzl +++ b/grpc-build-system.bzl @@ -1,3 +1,4 @@ +<<<<<<< HEAD # Copyright 2016, Google Inc. # All rights reserved. # @@ -28,34 +29,26 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. def grpc_cc_library(name, srcs = [], hdrs = [], deps = [], standalone = False, language = "C++"): +======= +# +# This is for the gRPC build system. This isn't intended to be used outsite of +# the BUILD file for gRPC. It contains the mapping for the template system we +# use to generate other platform's build system files. +# + +def grpc_cc_library(name, srcs = [], public_hdrs = [], hdrs = [], external_deps = [], deps = [], standalone = False, language = "C++"): +>>>>>>> e8dbd8aaae5d813546abe4956361c4e6512d8c88 copts = [] if language == "C": copts = ["-std=c99"] native.cc_library( name = name, srcs = srcs, - hdrs = hdrs, - deps = deps, + hdrs = hdrs + public_hdrs, + deps = deps + ["//external:" + dep for dep in external_deps], copts = copts, linkopts = ["-pthread"], includes = [ "include" ] ) - - -def nanopb(): - native.cc_library( - name = "nanopb", - srcs = [ - '//third_party/nanopb/pb_common.c', - '//third_party/nanopb/pb_decode.c', - '//third_party/nanopb/pb_encode.c', - ], - hdrs = [ - '//third_party/nanopb/pb.h', - '//third_party/nanopb/pb_common.h', - '//third_party/nanopb/pb_decode.h', - '//third_party/nanopb/pb_encode.h', - ] - ) diff --git a/test/core/end2end/BUILD b/test/core/end2end/BUILD new file mode 100644 index 0000000000000000000000000000000000000000..a0b10709cec25dd802910b31db2da8127b7b6454 --- /dev/null +++ b/test/core/end2end/BUILD @@ -0,0 +1,65 @@ +# Copyright 2016, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +load(":generate_tests.bzl", "grpc_end2end_tests") + +cc_library( + name = 'cq_verifier', + srcs = ['cq_verifier.c'], + hdrs = ['cq_verifier.h'], + deps = ['//:gpr', '//:grpc', '//test/core/util:grpc_test_util'] +) + +cc_library( + name = 'ssl_test_data', + hdrs = ['data/ssl_test_data.h'], +) + +cc_library( + name = 'fake_resolver', + hdrs = ['fake_resolver.h'], + srcs = ['fake_resolver.c'], + deps = ['//:gpr', '//:grpc', '//test/core/util:grpc_test_util'] +) + +cc_library( + name = 'http_proxy', + hdrs = ['fixtures/http_proxy.h'], + srcs = ['fixtures/http_proxy.c'], + deps = ['//:gpr', '//:grpc', '//test/core/util:grpc_test_util'] +) + +cc_library( + name = 'proxy', + hdrs = ['fixtures/proxy.h'], + srcs = ['fixtures/proxy.c'], + deps = ['//:gpr', '//:grpc', '//test/core/util:grpc_test_util'] +) + +grpc_end2end_tests() diff --git a/test/core/end2end/gen_build_yaml.py b/test/core/end2end/gen_build_yaml.py deleted file mode 100755 index d3d6f5e9ceb0bc08eb483990f40fb165d5b70d78..0000000000000000000000000000000000000000 --- a/test/core/end2end/gen_build_yaml.py +++ /dev/null @@ -1,287 +0,0 @@ -#!/usr/bin/env python2.7 -# Copyright 2015, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -"""Generates the appropriate build.json data for all the end2end tests.""" - - -import yaml -import collections -import hashlib - - -FixtureOptions = collections.namedtuple( - 'FixtureOptions', - 'fullstack includes_proxy dns_resolver secure platforms ci_mac tracing exclude_configs') -default_unsecure_fixture_options = FixtureOptions( - True, False, True, False, ['windows', 'linux', 'mac', 'posix'], True, False, []) -socketpair_unsecure_fixture_options = default_unsecure_fixture_options._replace(fullstack=False, dns_resolver=False) -default_secure_fixture_options = default_unsecure_fixture_options._replace(secure=True) -uds_fixture_options = default_unsecure_fixture_options._replace(dns_resolver=False, platforms=['linux', 'mac', 'posix']) -fd_unsecure_fixture_options = default_unsecure_fixture_options._replace( - dns_resolver=False, fullstack=False, platforms=['linux', 'mac', 'posix']) - - -# maps fixture name to whether it requires the security library -END2END_FIXTURES = { - 'h2_compress': default_unsecure_fixture_options, - 'h2_census': default_unsecure_fixture_options, - 'h2_load_reporting': default_unsecure_fixture_options, - 'h2_fakesec': default_secure_fixture_options._replace(ci_mac=False), - 'h2_fake_resolver': default_unsecure_fixture_options, - 'h2_fd': fd_unsecure_fixture_options, - 'h2_full': default_unsecure_fixture_options, - 'h2_full+pipe': default_unsecure_fixture_options._replace( - platforms=['linux']), - 'h2_full+trace': default_unsecure_fixture_options._replace(tracing=True), - 'h2_http_proxy': default_unsecure_fixture_options._replace(ci_mac=False), - 'h2_oauth2': default_secure_fixture_options._replace(ci_mac=False), - 'h2_proxy': default_unsecure_fixture_options._replace(includes_proxy=True, - ci_mac=False), - 'h2_sockpair_1byte': socketpair_unsecure_fixture_options._replace( - ci_mac=False, exclude_configs=['msan']), - 'h2_sockpair': socketpair_unsecure_fixture_options._replace(ci_mac=False), - 'h2_sockpair+trace': socketpair_unsecure_fixture_options._replace( - ci_mac=False, tracing=True), - 'h2_ssl': default_secure_fixture_options, - 'h2_ssl_cert': default_secure_fixture_options, - 'h2_ssl_proxy': default_secure_fixture_options._replace(includes_proxy=True, - ci_mac=False), - 'h2_uds': uds_fixture_options, -} - -TestOptions = collections.namedtuple( - 'TestOptions', - 'needs_fullstack needs_dns proxyable secure traceable cpu_cost') -default_test_options = TestOptions(False, False, True, False, True, 1.0) -connectivity_test_options = default_test_options._replace(needs_fullstack=True) - -LOWCPU = 0.1 - -# maps test names to options -END2END_TESTS = { - 'bad_hostname': default_test_options, - 'binary_metadata': default_test_options, - 'call_creds': default_test_options._replace(secure=True), - 'cancel_after_accept': default_test_options._replace(cpu_cost=LOWCPU), - 'cancel_after_client_done': default_test_options, - 'cancel_after_invoke': default_test_options._replace(cpu_cost=LOWCPU), - 'cancel_before_invoke': default_test_options._replace(cpu_cost=LOWCPU), - 'cancel_in_a_vacuum': default_test_options._replace(cpu_cost=LOWCPU), - 'cancel_with_status': default_test_options._replace(cpu_cost=LOWCPU), - 'compressed_payload': default_test_options._replace(proxyable=False), - 'connectivity': connectivity_test_options._replace(proxyable=False, - cpu_cost=LOWCPU), - 'default_host': default_test_options._replace(needs_fullstack=True, - needs_dns=True), - 'disappearing_server': connectivity_test_options, - 'empty_batch': default_test_options, - 'filter_causes_close': default_test_options, - 'filter_call_init_fails': default_test_options, - 'graceful_server_shutdown': default_test_options._replace(cpu_cost=LOWCPU), - 'hpack_size': default_test_options._replace(proxyable=False, - traceable=False), - 'high_initial_seqno': default_test_options, - 'idempotent_request': default_test_options, - 'invoke_large_request': default_test_options, - 'large_metadata': default_test_options, - 'max_concurrent_streams': default_test_options._replace(proxyable=False), - 'max_message_length': default_test_options, - 'negative_deadline': default_test_options, - 'network_status_change': default_test_options, - 'no_logging': default_test_options._replace(traceable=False), - 'no_op': default_test_options, - 'payload': default_test_options, - 'load_reporting_hook': default_test_options, - 'ping_pong_streaming': default_test_options, - 'ping': connectivity_test_options._replace(proxyable=False), - 'registered_call': default_test_options, - 'request_with_flags': default_test_options._replace( - proxyable=False, cpu_cost=LOWCPU), - 'request_with_payload': default_test_options, - 'server_finishes_request': default_test_options, - 'shutdown_finishes_calls': default_test_options, - 'shutdown_finishes_tags': default_test_options, - 'simple_cacheable_request': default_test_options, - 'simple_delayed_request': connectivity_test_options, - 'simple_metadata': default_test_options, - 'simple_request': default_test_options, - 'streaming_error_response': default_test_options, - 'trailing_metadata': default_test_options, -} - - -def compatible(f, t): - if END2END_TESTS[t].needs_fullstack: - if not END2END_FIXTURES[f].fullstack: - return False - if END2END_TESTS[t].needs_dns: - if not END2END_FIXTURES[f].dns_resolver: - return False - if not END2END_TESTS[t].proxyable: - if END2END_FIXTURES[f].includes_proxy: - return False - if not END2END_TESTS[t].traceable: - if END2END_FIXTURES[f].tracing: - return False - return True - - -def without(l, e): - l = l[:] - l.remove(e) - return l - - -def main(): - sec_deps = [ - 'grpc_test_util', - 'grpc', - 'gpr_test_util', - 'gpr' - ] - unsec_deps = [ - 'grpc_test_util_unsecure', - 'grpc_unsecure', - 'gpr_test_util', - 'gpr' - ] - json = { - '#': 'generated with test/end2end/gen_build_json.py', - 'libs': [ - { - 'name': 'end2end_tests', - 'build': 'private', - 'language': 'c', - 'secure': True, - 'src': ['test/core/end2end/end2end_tests.c'] + [ - 'test/core/end2end/tests/%s.c' % t - for t in sorted(END2END_TESTS.keys())], - 'headers': ['test/core/end2end/tests/cancel_test_helpers.h', - 'test/core/end2end/end2end_tests.h'], - 'deps': sec_deps, - 'vs_proj_dir': 'test/end2end/tests', - } - ] + [ - { - 'name': 'end2end_nosec_tests', - 'build': 'private', - 'language': 'c', - 'secure': False, - 'src': ['test/core/end2end/end2end_nosec_tests.c'] + [ - 'test/core/end2end/tests/%s.c' % t - for t in sorted(END2END_TESTS.keys()) - if not END2END_TESTS[t].secure], - 'headers': ['test/core/end2end/tests/cancel_test_helpers.h', - 'test/core/end2end/end2end_tests.h'], - 'deps': unsec_deps, - 'vs_proj_dir': 'test/end2end/tests', - } - ], - 'targets': [ - { - 'name': '%s_test' % f, - 'build': 'test', - 'language': 'c', - 'run': False, - 'src': ['test/core/end2end/fixtures/%s.c' % f], - 'platforms': END2END_FIXTURES[f].platforms, - 'ci_platforms': (END2END_FIXTURES[f].platforms - if END2END_FIXTURES[f].ci_mac else without( - END2END_FIXTURES[f].platforms, 'mac')), - 'deps': [ - 'end2end_tests' - ] + sec_deps, - 'vs_proj_dir': 'test/end2end/fixtures', - } - for f in sorted(END2END_FIXTURES.keys()) - ] + [ - { - 'name': '%s_nosec_test' % f, - 'build': 'test', - 'language': 'c', - 'secure': False, - 'src': ['test/core/end2end/fixtures/%s.c' % f], - 'run': False, - 'platforms': END2END_FIXTURES[f].platforms, - 'ci_platforms': (END2END_FIXTURES[f].platforms - if END2END_FIXTURES[f].ci_mac else without( - END2END_FIXTURES[f].platforms, 'mac')), - 'deps': [ - 'end2end_nosec_tests' - ] + unsec_deps, - 'vs_proj_dir': 'test/end2end/fixtures', - } - for f in sorted(END2END_FIXTURES.keys()) - if not END2END_FIXTURES[f].secure - ], - 'tests': [ - { - 'name': '%s_test' % f, - 'args': [t], - 'exclude_configs': END2END_FIXTURES[f].exclude_configs, - 'platforms': END2END_FIXTURES[f].platforms, - 'ci_platforms': (END2END_FIXTURES[f].platforms - if END2END_FIXTURES[f].ci_mac else without( - END2END_FIXTURES[f].platforms, 'mac')), - 'flaky': False, - 'language': 'c', - 'cpu_cost': END2END_TESTS[t].cpu_cost, - } - for f in sorted(END2END_FIXTURES.keys()) - for t in sorted(END2END_TESTS.keys()) if compatible(f, t) - ] + [ - { - 'name': '%s_nosec_test' % f, - 'args': [t], - 'exclude_configs': END2END_FIXTURES[f].exclude_configs, - 'platforms': END2END_FIXTURES[f].platforms, - 'ci_platforms': (END2END_FIXTURES[f].platforms - if END2END_FIXTURES[f].ci_mac else without( - END2END_FIXTURES[f].platforms, 'mac')), - 'flaky': False, - 'language': 'c', - 'cpu_cost': END2END_TESTS[t].cpu_cost, - } - for f in sorted(END2END_FIXTURES.keys()) - if not END2END_FIXTURES[f].secure - for t in sorted(END2END_TESTS.keys()) - if compatible(f, t) and not END2END_TESTS[t].secure - ], - 'core_end2end_tests': dict( - (t, END2END_TESTS[t].secure) - for t in END2END_TESTS.keys() - ) - } - print yaml.dump(json) - - -if __name__ == '__main__': - main() diff --git a/test/core/end2end/generate_tests.bzl b/test/core/end2end/generate_tests.bzl new file mode 100755 index 0000000000000000000000000000000000000000..d6b0aaa2f4a349cccd2148fbf8fdb5c894a86194 --- /dev/null +++ b/test/core/end2end/generate_tests.bzl @@ -0,0 +1,187 @@ +#!/usr/bin/env python2.7 +# Copyright 2015, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +"""Generates the appropriate build.json data for all the end2end tests.""" + + +def fixture_options(fullstack=True, includes_proxy=False, dns_resolver=True, + secure=True, tracing=False, + platforms=['windows', 'linux', 'mac', 'posix']): + return struct( + fullstack=fullstack, + includes_proxy=includes_proxy, + dns_resolver=dns_resolver, + secure=secure, + tracing=tracing, + #platforms=platforms + ) + + +# maps fixture name to whether it requires the security library +END2END_FIXTURES = { + 'h2_compress': fixture_options(), + 'h2_census': fixture_options(), + 'h2_load_reporting': fixture_options(), + 'h2_fakesec': fixture_options(), + 'h2_fake_resolver': fixture_options(), + 'h2_fd': fixture_options(dns_resolver=False, fullstack=False, + platforms=['linux', 'mac', 'posix']), + 'h2_full': fixture_options(), + 'h2_full+pipe': fixture_options(platforms=['linux']), + 'h2_full+trace': fixture_options(tracing=True), + 'h2_http_proxy': fixture_options(), + 'h2_oauth2': fixture_options(), + 'h2_proxy': fixture_options(includes_proxy=True), + 'h2_sockpair_1byte': fixture_options(fullstack=False, dns_resolver=False), + 'h2_sockpair': fixture_options(fullstack=False, dns_resolver=False), + 'h2_sockpair+trace': fixture_options(fullstack=False, dns_resolver=False, + tracing=True), + 'h2_ssl': fixture_options(secure=True), + 'h2_ssl_cert': fixture_options(secure=True), + 'h2_ssl_proxy': fixture_options(secure=True), + 'h2_uds': fixture_options(dns_resolver=False, + platforms=['linux', 'mac', 'posix']), +} + + +def test_options(needs_fullstack=False, needs_dns=False, proxyable=True, + secure=False, traceable=False): + return struct( + needs_fullstack=needs_fullstack, + needs_dns=needs_dns, + proxyable=proxyable, + secure=secure, + traceable=traceable + ) + + +# maps test names to options +END2END_TESTS = { + 'bad_hostname': test_options(), + 'binary_metadata': test_options(), + 'call_creds': test_options(secure=True), + 'cancel_after_accept': test_options(), + 'cancel_after_client_done': test_options(), + 'cancel_after_invoke': test_options(), + 'cancel_before_invoke': test_options(), + 'cancel_in_a_vacuum': test_options(), + 'cancel_with_status': test_options(), + 'compressed_payload': test_options(), + 'connectivity': test_options(needs_fullstack=True, proxyable=False), + 'default_host': test_options(needs_fullstack=True, needs_dns=True), + 'disappearing_server': test_options(needs_fullstack=True), + 'empty_batch': test_options(), + 'filter_causes_close': test_options(), + 'filter_call_init_fails': test_options(), + 'graceful_server_shutdown': test_options(), + 'hpack_size': test_options(proxyable=False, traceable=False), + 'high_initial_seqno': test_options(), + 'idempotent_request': test_options(), + 'invoke_large_request': test_options(), + 'large_metadata': test_options(), + 'max_concurrent_streams': test_options(proxyable=False), + 'max_message_length': test_options(), + 'negative_deadline': test_options(), + 'network_status_change': test_options(), + 'no_logging': test_options(traceable=False), + 'no_op': test_options(), + 'payload': test_options(), + 'load_reporting_hook': test_options(), + 'ping_pong_streaming': test_options(), + 'ping': test_options(proxyable=False), + 'registered_call': test_options(), + 'request_with_flags': test_options(proxyable=False), + 'request_with_payload': test_options(), + 'server_finishes_request': test_options(), + 'shutdown_finishes_calls': test_options(), + 'shutdown_finishes_tags': test_options(), + 'simple_cacheable_request': test_options(), + 'simple_delayed_request': test_options(needs_fullstack=True), + 'simple_metadata': test_options(), + 'simple_request': test_options(), + 'streaming_error_response': test_options(), + 'trailing_metadata': test_options(), +} + + +def compatible(fopt, topt): + if topt.needs_fullstack: + if not fopt.fullstack: + return False + if topt.needs_dns: + if not fopt.dns_resolver: + return False + if not topt.proxyable: + if fopt.includes_proxy: + return False + if not topt.traceable: + if fopt.tracing: + return False + return True + + +def grpc_end2end_tests(): + native.cc_library( + name = 'end2end_tests', + srcs = ['end2end_tests.c'] + [ + 'tests/%s.c' % t + for t in sorted(END2END_TESTS.keys())], + hdrs = [ + 'tests/cancel_test_helpers.h', + 'end2end_tests.h' + ], + deps = [ + ':cq_verifier', + ':ssl_test_data', + ':fake_resolver', + ':http_proxy', + ':proxy', + '//test/core/util:grpc_test_util', + '//:grpc', + '//test/core/util:gpr_test_util', + '//:gpr', + ] + ) + + for f, fopt in END2END_FIXTURES.items(): + native.cc_library( + name = '%s_test_lib' % f, + srcs = ['fixtures/%s.c' % f], + deps = [':end2end_tests'] + ) + for t, topt in END2END_TESTS.items(): + #print(compatible(fopt, topt), f, t, fopt, topt) + if not compatible(fopt, topt): continue + native.cc_test( + name = '%s_test@%s' % (f, t), + args = [t], + deps = [':%s_test_lib' % f] + ) diff --git a/test/core/support/BUILD b/test/core/support/BUILD index 50b8ca37c25e0a3142611762c11740c8d4f34197..eee086d85e4f8748da485c4f63682a317fe3d490 100644 --- a/test/core/support/BUILD +++ b/test/core/support/BUILD @@ -1,3 +1,32 @@ +# Copyright 2016, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + cc_test( name = "alloc_test", srcs = ["alloc_test.c"], diff --git a/test/core/util/BUILD b/test/core/util/BUILD index 60dd6d98954aa73ebfed5e604d3865dfa9ed55e7..79e6cfbeeba61717ed975e94178a6fc95ea687b4 100644 --- a/test/core/util/BUILD +++ b/test/core/util/BUILD @@ -18,7 +18,6 @@ cc_library( "grpc_profiler.c", "memory_counters.c", "mock_endpoint.c", - "one_corpus_entry_fuzzer.c", "parse_hexstring.c", "passthru_endpoint.c", "port_posix.c",