diff --git a/BUILDING.md b/BUILDING.md index 4a69c3b779f..eb7294d2dfe 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -20,7 +20,7 @@ If you plan to build using CMake If you are a contributor and plan to build and run tests, install the following as well: ```sh $ # clang and LLVM C++ lib is only required for sanitizer builds - $ [sudo] apt-get install clang-5.0 libc++-dev + $ [sudo] apt-get install clang libc++-dev ``` ## MacOS diff --git a/CMakeLists.txt b/CMakeLists.txt index c4ebefd3248..99add8840b8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -749,6 +749,7 @@ if(gRPC_BUILD_TESTS) if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) add_dependencies(buildtests_cxx bdp_estimator_test) endif() + add_dependencies(buildtests_cxx binder_smoke_test) if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_POSIX) add_dependencies(buildtests_cxx bm_alarm) endif() @@ -8300,6 +8301,41 @@ if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) endif() +endif() +if(gRPC_BUILD_TESTS) + +add_executable(binder_smoke_test + test/core/transport/binder/binder_smoke_test.cc + third_party/googletest/googletest/src/gtest-all.cc + third_party/googletest/googlemock/src/gmock-all.cc +) + +target_include_directories(binder_smoke_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(binder_smoke_test + ${_gRPC_PROTOBUF_LIBRARIES} + ${_gRPC_ALLTARGETS_LIBRARIES} + grpc_test_util +) + + endif() if(gRPC_BUILD_TESTS) if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_POSIX) diff --git a/build_autogenerated.yaml b/build_autogenerated.yaml index 705d903d731..c978ca45579 100644 --- a/build_autogenerated.yaml +++ b/build_autogenerated.yaml @@ -4381,6 +4381,16 @@ targets: - posix - mac uses_polling: false +- name: binder_smoke_test + gtest: true + build: test + language: c++ + headers: [] + src: + - test/core/transport/binder/binder_smoke_test.cc + deps: + - grpc_test_util + uses_polling: false - name: bm_alarm build: test language: c++ diff --git a/src/core/ext/transport/binder/README.md b/src/core/ext/transport/binder/README.md new file mode 100644 index 00000000000..2a797d3b4d8 --- /dev/null +++ b/src/core/ext/transport/binder/README.md @@ -0,0 +1,6 @@ +# Binder transport for cross process IPC on Android + +Under construction. + +This transport implements +[BinderChannel for native cross-process communication on Android](https://github.com/grpc/proposal/blob/master/L73-java-binderchannel.md) diff --git a/test/core/transport/binder/BUILD b/test/core/transport/binder/BUILD new file mode 100644 index 00000000000..7478fb63589 --- /dev/null +++ b/test/core/transport/binder/BUILD @@ -0,0 +1,34 @@ +# Copyright 2021 gRPC authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +load("//bazel:grpc_build_system.bzl", "grpc_cc_test", "grpc_package") + +licenses(["notice"]) + +grpc_package(name = "test/core/transport/binder") + +grpc_cc_test( + name = "binder_smoke_test", + srcs = ["binder_smoke_test.cc"], + external_deps = [ + "gtest", + ], + language = "C++", + uses_polling = False, + deps = [ + "//:gpr", + "//:grpc", + "//test/core/util:grpc_test_util", + ], +) diff --git a/test/core/transport/binder/binder_smoke_test.cc b/test/core/transport/binder/binder_smoke_test.cc new file mode 100644 index 00000000000..565d6765f31 --- /dev/null +++ b/test/core/transport/binder/binder_smoke_test.cc @@ -0,0 +1,38 @@ +// +// Copyright 2021 gRPC authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#include +#include +#include + +#include "test/core/util/test_config.h" + +namespace grpc_core { +namespace testing { +namespace { +TEST(SmokeTest, Empty) { gpr_log(GPR_INFO, __func__); } +} // namespace +} // namespace testing +} // namespace grpc_core + +int main(int argc, char** argv) { + ::testing::InitGoogleTest(&argc, argv); + grpc::testing::TestEnvironment env(argc, argv); + grpc_init(); + int ret = RUN_ALL_TESTS(); + grpc_shutdown(); + return ret; +} diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index 257541c653f..256adb9b286 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -1011,6 +1011,7 @@ src/core/ext/filters/workarounds/workaround_cronet_compression_filter.h \ src/core/ext/filters/workarounds/workaround_utils.cc \ src/core/ext/filters/workarounds/workaround_utils.h \ src/core/ext/transport/README.md \ +src/core/ext/transport/binder/README.md \ src/core/ext/transport/chttp2/README.md \ src/core/ext/transport/chttp2/alpn/alpn.cc \ src/core/ext/transport/chttp2/alpn/alpn.h \ diff --git a/tools/run_tests/generated/tests.json b/tools/run_tests/generated/tests.json index 601aa76268b..0d167760c63 100644 --- a/tools/run_tests/generated/tests.json +++ b/tools/run_tests/generated/tests.json @@ -3429,6 +3429,30 @@ ], "uses_polling": false }, + { + "args": [], + "benchmark": false, + "ci_platforms": [ + "linux", + "mac", + "posix", + "windows" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "gtest": true, + "language": "c++", + "name": "binder_smoke_test", + "platforms": [ + "linux", + "mac", + "posix", + "windows" + ], + "uses_polling": false + }, { "args": [], "benchmark": true,