Also add size

pull/14788/head
Adele Zhou 7 years ago
parent 7bc84a2256
commit aadbd18596
  1. 7
      bazel/grpc_build_system.bzl
  2. 1
      test/core/end2end/fuzzers/BUILD
  3. 3
      test/core/util/grpc_fuzzer.bzl

@ -108,7 +108,7 @@ def grpc_proto_library(name, srcs = [], deps = [], well_known_protos = False,
generate_mocks = generate_mocks,
)
def grpc_cc_test(name, srcs = [], deps = [], external_deps = [], args = [], data = [], uses_polling = True, language = "C++", timeout = "moderate"):
def grpc_cc_test(name, srcs = [], deps = [], external_deps = [], args = [], data = [], uses_polling = True, language = "C++", size = "medium", timeout = "moderate"):
copts = []
if language.upper() == "C":
copts = if_not_windows(["-std=c99"])
@ -120,6 +120,7 @@ def grpc_cc_test(name, srcs = [], deps = [], external_deps = [], args = [], data
'deps': deps + _get_external_deps(external_deps),
'copts': copts,
'linkopts': if_not_windows(["-pthread"]),
'size': size,
'timeout': timeout,
}
if uses_polling:
@ -131,9 +132,11 @@ def grpc_cc_test(name, srcs = [], deps = [], external_deps = [], args = [], data
srcs = [
'//test/core/util:run_with_poller_sh',
],
size = size,
timeout = timeout,
args = [
poller,
'$(location %s)' % name
'$(location %s)' % name,
] + args['args'],
)
else:

@ -25,6 +25,7 @@ grpc_fuzzer(
srcs = ["api_fuzzer.cc"],
language = "C++",
corpus = "api_fuzzer_corpus",
size = "enormous",
timeout = "eternal",
deps = [
"//:gpr",

@ -14,7 +14,7 @@
load("//bazel:grpc_build_system.bzl", "grpc_cc_test")
def grpc_fuzzer(name, corpus, srcs = [], deps = [], timeout = "long", **kwargs):
def grpc_fuzzer(name, corpus, srcs = [], deps = [], size = "large", timeout = "long", **kwargs):
grpc_cc_test(
name = name,
srcs = srcs,
@ -23,6 +23,7 @@ def grpc_fuzzer(name, corpus, srcs = [], deps = [], timeout = "long", **kwargs):
external_deps = [
'gtest',
],
size = size,
timeout = timeout,
args = ["--directory=" + native.package_name() + "/" + corpus,],
**kwargs

Loading…
Cancel
Save