# Copyright (c) 2021 Huawei Device Co., Ltd. # 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. import("//build/test.gni") import("../../../base/config.gni") module_output_path = "${OHOS_PROFILER_TEST_MODULE_OUTPUT_PATH}/device" config("module_private_config") { visibility = [ ":*" ] } ohos_unittest("ipc_ut") { module_out_path = module_output_path sources = [ "../src/ipc_generator_impl.cpp", "unittest/client_connection_test.cpp", "unittest/client_map_test.cpp", "unittest/ipc_generator_impl_test.cpp", "unittest/service_base_test.cpp", "unittest/service_entry_test.cpp", "unittest/socket_context_test.cpp", "unittest/unix_socket_client_test.cpp", "unittest/unix_socket_server_test.cpp", ] include_dirs = [ "${OHOS_PROFILER_DIR}/device/services/ipc/include", "//third_party/googletest/googletest/include/gtest", ] deps = [ "${OHOS_PROFILER_DIR}/device/services/shared_memory:shared_memory_source", "${OHOS_PROFILER_DIR}/protos/services:plugin_service_proto", "${OHOS_PROFILER_DIR}/protos/services:profiler_service_all_type_source", "../:ipc", "//third_party/googletest:gtest", ] cflags = [ "-Wno-inconsistent-missing-override", "-Dprivate=public", #allow test code access private members "-Dprotected=public", #allow test code access private members ] external_deps = [ "hilog:libhilog" ] subsystem_name = "${OHOS_PROFILER_SUBSYS_NAME}" } group("unittest") { testonly = true deps = [ ":ipc_ut" ] }