diff --git a/CMakeLists.txt b/CMakeLists.txt index 7128fd2f552..d0172728836 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1458,7 +1458,6 @@ if(gRPC_BUILD_TESTS) add_dependencies(buildtests_cxx test_core_event_engine_posix_timer_heap_test) add_dependencies(buildtests_cxx test_core_event_engine_posix_timer_list_test) add_dependencies(buildtests_cxx test_core_event_engine_slice_buffer_test) - add_dependencies(buildtests_cxx test_core_gpr_time_test) add_dependencies(buildtests_cxx test_core_gprpp_time_test) add_dependencies(buildtests_cxx test_core_iomgr_timer_heap_test) add_dependencies(buildtests_cxx test_core_security_credentials_test) @@ -1468,6 +1467,7 @@ if(gRPC_BUILD_TESTS) if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_POSIX) add_dependencies(buildtests_cxx test_core_transport_test_suite_chaotic_good_test) endif() + add_dependencies(buildtests_cxx test_core_util_time_test) add_dependencies(buildtests_cxx test_cpp_client_credentials_test) add_dependencies(buildtests_cxx test_cpp_end2end_ssl_credentials_test) add_dependencies(buildtests_cxx test_cpp_ext_chaotic_good_test) @@ -6313,7 +6313,7 @@ endif() if(gRPC_BUILD_TESTS) add_executable(alloc_test - test/core/gpr/alloc_test.cc + test/core/util/alloc_test.cc ) if(WIN32 AND MSVC) if(BUILD_SHARED_LIBS) @@ -11722,7 +11722,7 @@ endif() if(gRPC_BUILD_TESTS) add_executable(cpu_test - test/core/gpr/cpu_test.cc + test/core/util/cpu_test.cc ) if(WIN32 AND MSVC) if(BUILD_SHARED_LIBS) @@ -12918,7 +12918,7 @@ endif() if(gRPC_BUILD_TESTS) add_executable(env_test - test/core/gpr/env_test.cc + test/core/util/env_test.cc ) if(WIN32 AND MSVC) if(BUILD_SHARED_LIBS) @@ -19118,7 +19118,7 @@ endif() if(gRPC_BUILD_TESTS) add_executable(log_test - test/core/gpr/log_test.cc + test/core/util/log_test.cc ) if(WIN32 AND MSVC) if(BUILD_SHARED_LIBS) @@ -28540,7 +28540,7 @@ endif() if(gRPC_BUILD_TESTS) add_executable(spinlock_test - test/core/gpr/spinlock_test.cc + test/core/util/spinlock_test.cc ) if(WIN32 AND MSVC) if(BUILD_SHARED_LIBS) @@ -29286,7 +29286,7 @@ endif() if(gRPC_BUILD_TESTS) add_executable(string_test - test/core/gpr/string_test.cc + test/core/util/string_test.cc ) if(WIN32 AND MSVC) if(BUILD_SHARED_LIBS) @@ -29371,7 +29371,7 @@ endif() if(gRPC_BUILD_TESTS) add_executable(sync_test - test/core/gpr/sync_test.cc + test/core/util/sync_test.cc ) if(WIN32 AND MSVC) if(BUILD_SHARED_LIBS) @@ -29998,48 +29998,6 @@ target_link_libraries(test_core_event_engine_slice_buffer_test ) -endif() -if(gRPC_BUILD_TESTS) - -add_executable(test_core_gpr_time_test - test/core/gpr/time_test.cc -) -if(WIN32 AND MSVC) - if(BUILD_SHARED_LIBS) - target_compile_definitions(test_core_gpr_time_test - PRIVATE - "GPR_DLL_IMPORTS" - "GRPC_DLL_IMPORTS" - ) - endif() -endif() -target_compile_features(test_core_gpr_time_test PUBLIC cxx_std_14) -target_include_directories(test_core_gpr_time_test - PRIVATE - ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/include - ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} - ${_gRPC_RE2_INCLUDE_DIR} - ${_gRPC_SSL_INCLUDE_DIR} - ${_gRPC_UPB_GENERATED_DIR} - ${_gRPC_UPB_GRPC_GENERATED_DIR} - ${_gRPC_UPB_INCLUDE_DIR} - ${_gRPC_XXHASH_INCLUDE_DIR} - ${_gRPC_ZLIB_INCLUDE_DIR} - third_party/googletest/googletest/include - third_party/googletest/googletest - third_party/googletest/googlemock/include - third_party/googletest/googlemock - ${_gRPC_PROTO_GENS_DIR} -) - -target_link_libraries(test_core_gpr_time_test - ${_gRPC_ALLTARGETS_LIBRARIES} - gtest - grpc_test_util -) - - endif() if(gRPC_BUILD_TESTS) @@ -30387,6 +30345,48 @@ endif() endif() if(gRPC_BUILD_TESTS) +add_executable(test_core_util_time_test + test/core/util/time_test.cc +) +if(WIN32 AND MSVC) + if(BUILD_SHARED_LIBS) + target_compile_definitions(test_core_util_time_test + PRIVATE + "GPR_DLL_IMPORTS" + "GRPC_DLL_IMPORTS" + ) + endif() +endif() +target_compile_features(test_core_util_time_test PUBLIC cxx_std_14) +target_include_directories(test_core_util_time_test + PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/include + ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} + ${_gRPC_SSL_INCLUDE_DIR} + ${_gRPC_UPB_GENERATED_DIR} + ${_gRPC_UPB_GRPC_GENERATED_DIR} + ${_gRPC_UPB_INCLUDE_DIR} + ${_gRPC_XXHASH_INCLUDE_DIR} + ${_gRPC_ZLIB_INCLUDE_DIR} + third_party/googletest/googletest/include + third_party/googletest/googletest + third_party/googletest/googlemock/include + third_party/googletest/googlemock + ${_gRPC_PROTO_GENS_DIR} +) + +target_link_libraries(test_core_util_time_test + ${_gRPC_ALLTARGETS_LIBRARIES} + gtest + grpc_test_util +) + + +endif() +if(gRPC_BUILD_TESTS) + add_executable(test_cpp_client_credentials_test test/cpp/client/credentials_test.cc test/cpp/util/tls_test_utils.cc @@ -32064,7 +32064,7 @@ endif() if(gRPC_BUILD_TESTS) add_executable(useful_test - test/core/gpr/useful_test.cc + test/core/util/useful_test.cc ) target_compile_features(useful_test PUBLIC cxx_std_14) target_include_directories(useful_test diff --git a/build_autogenerated.yaml b/build_autogenerated.yaml index 70180718c9d..f72466229e9 100644 --- a/build_autogenerated.yaml +++ b/build_autogenerated.yaml @@ -5407,7 +5407,7 @@ targets: language: c++ headers: [] src: - - test/core/gpr/alloc_test.cc + - test/core/util/alloc_test.cc deps: - gtest - grpc_test_util @@ -8402,7 +8402,7 @@ targets: language: c++ headers: [] src: - - test/core/gpr/cpu_test.cc + - test/core/util/cpu_test.cc deps: - gtest - grpc_test_util @@ -8995,7 +8995,7 @@ targets: language: c++ headers: [] src: - - test/core/gpr/env_test.cc + - test/core/util/env_test.cc deps: - gtest - grpc_test_util @@ -12778,7 +12778,7 @@ targets: language: c++ headers: [] src: - - test/core/gpr/log_test.cc + - test/core/util/log_test.cc deps: - gtest - grpc_test_util @@ -18693,7 +18693,7 @@ targets: language: c++ headers: [] src: - - test/core/gpr/spinlock_test.cc + - test/core/util/spinlock_test.cc deps: - gtest - grpc_test_util @@ -18988,7 +18988,7 @@ targets: language: c++ headers: [] src: - - test/core/gpr/string_test.cc + - test/core/util/string_test.cc deps: - gtest - grpc_test_util @@ -19017,7 +19017,7 @@ targets: language: c++ headers: [] src: - - test/core/gpr/sync_test.cc + - test/core/util/sync_test.cc deps: - gtest - grpc_test_util @@ -19345,17 +19345,6 @@ targets: - absl/status:statusor - absl/utility:utility - gpr -- name: test_core_gpr_time_test - gtest: true - build: test - language: c++ - headers: [] - src: - - test/core/gpr/time_test.cc - deps: - - gtest - - grpc_test_util - uses_polling: false - name: test_core_gprpp_time_test gtest: true build: test @@ -19527,6 +19516,17 @@ targets: - linux - posix uses_polling: false +- name: test_core_util_time_test + gtest: true + build: test + language: c++ + headers: [] + src: + - test/core/util/time_test.cc + deps: + - gtest + - grpc_test_util + uses_polling: false - name: test_cpp_client_credentials_test gtest: true build: test @@ -20266,7 +20266,7 @@ targets: headers: - src/core/util/useful.h src: - - test/core/gpr/useful_test.cc + - test/core/util/useful_test.cc deps: - gtest uses_polling: false diff --git a/test/core/gpr/BUILD b/test/core/util/BUILD similarity index 98% rename from test/core/gpr/BUILD rename to test/core/util/BUILD index 381d592e30d..728ef6bd167 100644 --- a/test/core/gpr/BUILD +++ b/test/core/util/BUILD @@ -16,7 +16,7 @@ load("//bazel:grpc_build_system.bzl", "grpc_cc_test", "grpc_package") licenses(["notice"]) -grpc_package(name = "test/core/gpr") +grpc_package(name = "test/core/util") grpc_cc_test( name = "alloc_test", diff --git a/test/core/gpr/alloc_test.cc b/test/core/util/alloc_test.cc similarity index 100% rename from test/core/gpr/alloc_test.cc rename to test/core/util/alloc_test.cc diff --git a/test/core/gpr/cpu_test.cc b/test/core/util/cpu_test.cc similarity index 100% rename from test/core/gpr/cpu_test.cc rename to test/core/util/cpu_test.cc diff --git a/test/core/gpr/env_test.cc b/test/core/util/env_test.cc similarity index 100% rename from test/core/gpr/env_test.cc rename to test/core/util/env_test.cc diff --git a/test/core/gpr/log_test.cc b/test/core/util/log_test.cc similarity index 100% rename from test/core/gpr/log_test.cc rename to test/core/util/log_test.cc diff --git a/test/core/gpr/spinlock_test.cc b/test/core/util/spinlock_test.cc similarity index 100% rename from test/core/gpr/spinlock_test.cc rename to test/core/util/spinlock_test.cc diff --git a/test/core/gpr/string_test.cc b/test/core/util/string_test.cc similarity index 100% rename from test/core/gpr/string_test.cc rename to test/core/util/string_test.cc diff --git a/test/core/gpr/sync_test.cc b/test/core/util/sync_test.cc similarity index 100% rename from test/core/gpr/sync_test.cc rename to test/core/util/sync_test.cc diff --git a/test/core/gpr/time_test.cc b/test/core/util/time_test.cc similarity index 100% rename from test/core/gpr/time_test.cc rename to test/core/util/time_test.cc diff --git a/test/core/gpr/useful_test.cc b/test/core/util/useful_test.cc similarity index 100% rename from test/core/gpr/useful_test.cc rename to test/core/util/useful_test.cc diff --git a/tools/run_tests/generated/tests.json b/tools/run_tests/generated/tests.json index a733817a370..8dc1a7348a1 100644 --- a/tools/run_tests/generated/tests.json +++ b/tools/run_tests/generated/tests.json @@ -10406,7 +10406,7 @@ "flaky": false, "gtest": true, "language": "c++", - "name": "test_core_gpr_time_test", + "name": "test_core_gprpp_time_test", "platforms": [ "linux", "mac", @@ -10430,7 +10430,7 @@ "flaky": false, "gtest": true, "language": "c++", - "name": "test_core_gprpp_time_test", + "name": "test_core_iomgr_timer_heap_test", "platforms": [ "linux", "mac", @@ -10454,14 +10454,14 @@ "flaky": false, "gtest": true, "language": "c++", - "name": "test_core_iomgr_timer_heap_test", + "name": "test_core_security_credentials_test", "platforms": [ "linux", "mac", "posix", "windows" ], - "uses_polling": false + "uses_polling": true }, { "args": [], @@ -10478,7 +10478,7 @@ "flaky": false, "gtest": true, "language": "c++", - "name": "test_core_security_credentials_test", + "name": "test_core_security_ssl_credentials_test", "platforms": [ "linux", "mac", @@ -10502,14 +10502,14 @@ "flaky": false, "gtest": true, "language": "c++", - "name": "test_core_security_ssl_credentials_test", + "name": "test_core_slice_slice_buffer_test", "platforms": [ "linux", "mac", "posix", "windows" ], - "uses_polling": true + "uses_polling": false }, { "args": [], @@ -10526,7 +10526,7 @@ "flaky": false, "gtest": true, "language": "c++", - "name": "test_core_slice_slice_buffer_test", + "name": "test_core_slice_slice_test", "platforms": [ "linux", "mac", @@ -10540,9 +10540,7 @@ "benchmark": false, "ci_platforms": [ "linux", - "mac", - "posix", - "windows" + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], @@ -10550,12 +10548,10 @@ "flaky": false, "gtest": true, "language": "c++", - "name": "test_core_slice_slice_test", + "name": "test_core_transport_test_suite_chaotic_good_test", "platforms": [ "linux", - "mac", - "posix", - "windows" + "posix" ], "uses_polling": false }, @@ -10564,7 +10560,9 @@ "benchmark": false, "ci_platforms": [ "linux", - "posix" + "mac", + "posix", + "windows" ], "cpu_cost": 1.0, "exclude_configs": [], @@ -10572,10 +10570,12 @@ "flaky": false, "gtest": true, "language": "c++", - "name": "test_core_transport_test_suite_chaotic_good_test", + "name": "test_core_util_time_test", "platforms": [ "linux", - "posix" + "mac", + "posix", + "windows" ], "uses_polling": false },