From 74ade125f28225b983b64a94aaaebc2f52471a70 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Fri, 11 Oct 2019 06:35:12 -0400 Subject: [PATCH] toolchains no longer support machine types --- bazel/grpc_build_system.bzl | 8 +++++++- test/core/gprpp/BUILD | 6 +++--- test/core/iomgr/BUILD | 6 +++--- test/cpp/qps/BUILD | 6 +++--- 4 files changed, 16 insertions(+), 10 deletions(-) diff --git a/bazel/grpc_build_system.bzl b/bazel/grpc_build_system.bzl index 95c639c9dbc..3450b791bbd 100644 --- a/bazel/grpc_build_system.bzl +++ b/bazel/grpc_build_system.bzl @@ -31,6 +31,10 @@ load("@build_bazel_rules_apple//apple:ios.bzl", "ios_unit_test") # The set of pollers to test against if a test exercises polling POLLERS = ["epollex", "epoll1", "poll"] +# set exec_properties = LARGE_MACHINE, to run the test on a large machine +# see //third_party/toolchains/machine_size for details +LARGE_MACHINE = { "gceMachineType" : "n1-standard-8"} + def if_not_windows(a): return select({ "//:windows": [], @@ -165,7 +169,7 @@ def ios_cc_test( deps = ios_test_deps, ) -def grpc_cc_test(name, srcs = [], deps = [], external_deps = [], args = [], data = [], uses_polling = True, language = "C++", size = "medium", timeout = None, tags = [], exec_compatible_with = []): +def grpc_cc_test(name, srcs = [], deps = [], external_deps = [], args = [], data = [], uses_polling = True, language = "C++", size = "medium", timeout = None, tags = [], exec_compatible_with = [], exec_properties = {}): copts = if_mac(["-DGRPC_CFSTREAM"]) if language.upper() == "C": copts = copts + if_not_windows(["-std=c99"]) @@ -179,6 +183,7 @@ def grpc_cc_test(name, srcs = [], deps = [], external_deps = [], args = [], data "size": size, "timeout": timeout, "exec_compatible_with": exec_compatible_with, + "exec_properties": exec_properties, } if uses_polling: # the vanilla version of the test should run on platforms that only @@ -207,6 +212,7 @@ def grpc_cc_test(name, srcs = [], deps = [], external_deps = [], args = [], data ] + args["args"], tags = (tags + ["no_windows", "no_mac"]), exec_compatible_with = exec_compatible_with, + exec_properties = exec_properties, ) else: # the test behavior doesn't depend on polling, just generate the test diff --git a/test/core/gprpp/BUILD b/test/core/gprpp/BUILD index 017a5b9fdba..3e23d78b124 100644 --- a/test/core/gprpp/BUILD +++ b/test/core/gprpp/BUILD @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -load("//bazel:grpc_build_system.bzl", "grpc_cc_library", "grpc_cc_test", "grpc_cc_binary", "grpc_package") +load("//bazel:grpc_build_system.bzl", "grpc_cc_library", "grpc_cc_test", "grpc_cc_binary", "grpc_package", "LARGE_MACHINE") licenses(["notice"]) # Apache v2 @@ -111,9 +111,9 @@ grpc_cc_test( grpc_cc_test( name = "mpscq_test", srcs = ["mpscq_test.cc"], - exec_compatible_with = ["//third_party/toolchains/machine_size:large"], + exec_properties = LARGE_MACHINE, language = "C++", - tags = ["no_windows"], # machine_size:large is not configured for windows RBE + tags = ["no_windows"], # LARGE_MACHINE is not configured for windows RBE deps = [ "//:gpr", "//test/core/util:grpc_test_util", diff --git a/test/core/iomgr/BUILD b/test/core/iomgr/BUILD index 0025ef334bd..13327db112f 100644 --- a/test/core/iomgr/BUILD +++ b/test/core/iomgr/BUILD @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -load("//bazel:grpc_build_system.bzl", "grpc_cc_library", "grpc_cc_test", "grpc_cc_binary", "grpc_package") +load("//bazel:grpc_build_system.bzl", "grpc_cc_library", "grpc_cc_test", "grpc_cc_binary", "grpc_package", "LARGE_MACHINE") licenses(["notice"]) # Apache v2 @@ -39,9 +39,9 @@ grpc_cc_library( grpc_cc_test( name = "combiner_test", srcs = ["combiner_test.cc"], - exec_compatible_with = ["//third_party/toolchains/machine_size:large"], + exec_properties = LARGE_MACHINE, language = "C++", - tags = ["no_windows"], # machine_size:large is not configured for windows RBE + tags = ["no_windows"], # LARGE_MACHINE is not configured for windows RBE deps = [ "//:gpr", "//:grpc", diff --git a/test/cpp/qps/BUILD b/test/cpp/qps/BUILD index 433b0b32c75..60596c8e31d 100644 --- a/test/cpp/qps/BUILD +++ b/test/cpp/qps/BUILD @@ -14,7 +14,7 @@ licenses(["notice"]) # Apache v2 -load("//bazel:grpc_build_system.bzl", "grpc_cc_test", "grpc_cc_library", "grpc_cc_binary", "grpc_package") +load("//bazel:grpc_build_system.bzl", "grpc_cc_test", "grpc_cc_library", "grpc_cc_binary", "grpc_package", "LARGE_MACHINE") load("//test/cpp/qps:qps_benchmark_script.bzl", "qps_json_driver_batch", "json_run_localhost_batch") grpc_package(name = "test/cpp/qps") @@ -169,8 +169,8 @@ grpc_cc_test( grpc_cc_test( name = "qps_openloop_test", srcs = ["qps_openloop_test.cc"], - exec_compatible_with = ["//third_party/toolchains/machine_size:large"], - tags = ["no_windows"], # machine_size:large is not configured for windows RBE + exec_properties = LARGE_MACHINE, + tags = ["no_windows"], # LARGE_MACHINE is not configured for windows RBE deps = [ ":benchmark_config", ":driver_impl",