Add workaround for bazel

pull/24303/head
Esun Kim 4 years ago
parent 4563ff9780
commit ccdfcc2ee8
  1. 16
      CMakeLists.txt
  2. 4
      build_autogenerated.yaml
  3. 4
      test/core/client_channel/resolvers/BUILD
  4. 13
      test/cpp/qps/qps_benchmark_script.bzl
  5. 4
      tools/run_tests/generated/tests.json

@ -556,8 +556,8 @@ if(gRPC_BUILD_TESTS)
add_dependencies(buildtests_c concurrent_connectivity_test)
add_dependencies(buildtests_c connection_refused_test)
add_dependencies(buildtests_c cpu_test)
add_dependencies(buildtests_c dns_resolver_connectivity_using_ares_resolver_test)
add_dependencies(buildtests_c dns_resolver_connectivity_using_native_resolver_test)
add_dependencies(buildtests_c dns_resolver_connectivity_using_ares_test)
add_dependencies(buildtests_c dns_resolver_connectivity_using_native_test)
add_dependencies(buildtests_c dns_resolver_cooldown_test)
add_dependencies(buildtests_c dns_resolver_test)
if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX)
@ -5105,11 +5105,11 @@ target_link_libraries(cpu_test
endif()
if(gRPC_BUILD_TESTS)
add_executable(dns_resolver_connectivity_using_ares_resolver_test
add_executable(dns_resolver_connectivity_using_ares_test
test/core/client_channel/resolvers/dns_resolver_connectivity_test.cc
)
target_include_directories(dns_resolver_connectivity_using_ares_resolver_test
target_include_directories(dns_resolver_connectivity_using_ares_test
PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/include
@ -5122,7 +5122,7 @@ target_include_directories(dns_resolver_connectivity_using_ares_resolver_test
${_gRPC_ZLIB_INCLUDE_DIR}
)
target_link_libraries(dns_resolver_connectivity_using_ares_resolver_test
target_link_libraries(dns_resolver_connectivity_using_ares_test
${_gRPC_ALLTARGETS_LIBRARIES}
grpc_test_util
grpc
@ -5135,11 +5135,11 @@ target_link_libraries(dns_resolver_connectivity_using_ares_resolver_test
endif()
if(gRPC_BUILD_TESTS)
add_executable(dns_resolver_connectivity_using_native_resolver_test
add_executable(dns_resolver_connectivity_using_native_test
test/core/client_channel/resolvers/dns_resolver_connectivity_test.cc
)
target_include_directories(dns_resolver_connectivity_using_native_resolver_test
target_include_directories(dns_resolver_connectivity_using_native_test
PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/include
@ -5152,7 +5152,7 @@ target_include_directories(dns_resolver_connectivity_using_native_resolver_test
${_gRPC_ZLIB_INCLUDE_DIR}
)
target_link_libraries(dns_resolver_connectivity_using_native_resolver_test
target_link_libraries(dns_resolver_connectivity_using_native_test
${_gRPC_ALLTARGETS_LIBRARIES}
grpc_test_util
grpc

@ -3290,7 +3290,7 @@ targets:
- address_sorting
- upb
uses_polling: false
- name: dns_resolver_connectivity_using_ares_resolver_test
- name: dns_resolver_connectivity_using_ares_test
build: test
language: c
headers: []
@ -3304,7 +3304,7 @@ targets:
- upb
args:
- --resolver=ares
- name: dns_resolver_connectivity_using_native_resolver_test
- name: dns_resolver_connectivity_using_native_test
build: test
language: c
headers: []

@ -19,7 +19,7 @@ grpc_package(name = "test/core/client_channel_resolvers")
licenses(["notice"]) # Apache v2
grpc_cc_test(
name = "dns_resolver_connectivity_using_ares_resolver_test",
name = "dns_resolver_connectivity_using_ares_test",
srcs = ["dns_resolver_connectivity_test.cc"],
args = [
"--resolver=ares",
@ -33,7 +33,7 @@ grpc_cc_test(
)
grpc_cc_test(
name = "dns_resolver_connectivity_using_native_resolver_test",
name = "dns_resolver_connectivity_using_native_test",
srcs = ["dns_resolver_connectivity_test.cc"],
args = [
"--resolver=native",

@ -29,10 +29,19 @@ load("//bazel:grpc_build_system.bzl", "grpc_cc_test")
load("//test/cpp/qps:qps_json_driver_scenarios.bzl", "QPS_JSON_DRIVER_SCENARIOS")
load("//test/cpp/qps:json_run_localhost_scenarios.bzl", "JSON_RUN_LOCALHOST_SCENARIOS")
def add_suffix(name):
# NOTE(https://github.com/grpc/grpc/issues/24178): Add the suffix to the name
# to avoid having the target name that 89 or 90 long.
m = len(name) - (89 - len("//test/cpp/qps:"))
if m == 0 or m == 1:
return name + "_" * (2 - m)
else:
return name
def qps_json_driver_batch():
for scenario in QPS_JSON_DRIVER_SCENARIOS:
grpc_cc_test(
name = "qps_json_driver_test_%s" % scenario,
name = add_suffix("qps_json_driver_test_%s" % scenario),
srcs = ["qps_json_driver.cc"],
args = [
"--run_inproc",
@ -58,7 +67,7 @@ def qps_json_driver_batch():
def json_run_localhost_batch():
for scenario in JSON_RUN_LOCALHOST_SCENARIOS:
grpc_cc_test(
name = "json_run_localhost_%s" % scenario,
name = add_suffix("json_run_localhost_%s" % scenario),
srcs = ["json_run_localhost.cc"],
args = [
"--scenarios_json",

@ -874,7 +874,7 @@
"flaky": false,
"gtest": false,
"language": "c",
"name": "dns_resolver_connectivity_using_ares_resolver_test",
"name": "dns_resolver_connectivity_using_ares_test",
"platforms": [
"linux",
"mac",
@ -900,7 +900,7 @@
"flaky": false,
"gtest": false,
"language": "c",
"name": "dns_resolver_connectivity_using_native_resolver_test",
"name": "dns_resolver_connectivity_using_native_test",
"platforms": [
"linux",
"mac",

Loading…
Cancel
Save