Converting end2end/generate_tests.bzl.

pull/10621/head
Nicolas "Pixel" Noble 8 years ago
parent 2b0f00168b
commit 3bd8177ce6
  1. 7
      bazel/grpc_build_system.bzl
  2. 11
      test/core/end2end/generate_tests.bzl

@ -100,3 +100,10 @@ def grpc_cc_binary(name, srcs = [], deps = [], external_deps = [], args = [], da
def grpc_generate_one_off_targets():
pass
def grpc_sh_test(name, srcs, args = [], data = []):
native.sh_test(
name = name,
srcs = srcs,
args = args,
data = data)

@ -28,6 +28,7 @@
# (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("//bazel:grpc_build_system.bzl", "grpc_sh_test", "grpc_cc_binary", "grpc_cc_library")
"""Generates the appropriate build.json data for all the end2end tests."""
@ -156,7 +157,7 @@ def compatible(fopt, topt):
def grpc_end2end_tests():
native.cc_library(
grpc_cc_library(
name = 'end2end_tests',
srcs = ['end2end_tests.c', 'end2end_test_utils.c'] + [
'tests/%s.c' % t
@ -165,7 +166,7 @@ def grpc_end2end_tests():
'tests/cancel_test_helpers.h',
'end2end_tests.h'
],
copts = ['-std=c99'],
language = "C",
deps = [
':cq_verifier',
':ssl_test_data',
@ -180,16 +181,16 @@ def grpc_end2end_tests():
)
for f, fopt in END2END_FIXTURES.items():
native.cc_binary(
grpc_cc_binary(
name = '%s_test' % f,
srcs = ['fixtures/%s.c' % f],
copts = ['-std=c99'],
language = "C",
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.sh_test(
grpc_sh_test(
name = '%s_test@%s' % (f, t),
srcs = ['end2end_test.sh'],
args = ['$(location %s_test)' % f, t],

Loading…
Cancel
Save