1# Copyright (c) Huawei Technologies Co., Ltd. 2021. All rights reserved. 2# Licensed under the Apache License, Version 2.0 (the "License"); 3# you may not use this file except in compliance with the License. 4# You may obtain a copy of the License at 5# 6# http://www.apache.org/licenses/LICENSE-2.0 7# 8# Unless required by applicable law or agreed to in writing, software 9# distributed under the License is distributed on an "AS IS" BASIS, 10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11# See the License for the specific language governing permissions and 12# limitations under the License. 13 14import("//build/test.gni") 15import("../../../base/config.gni") 16 17module_output_path = "${OHOS_PROFILER_TEST_MODULE_OUTPUT_PATH}/device" 18config("module_private_config") { 19 visibility = [ ":*" ] 20} 21 22ohos_unittest("ipc_ut") { 23 module_out_path = module_output_path 24 sources = [ 25 "../src/ipc_generator_impl.cpp", 26 "unittest/client_connection_test.cpp", 27 "unittest/client_map_test.cpp", 28 "unittest/ipc_generator_impl_test.cpp", 29 "unittest/service_base_test.cpp", 30 "unittest/service_entry_test.cpp", 31 "unittest/socket_context_test.cpp", 32 "unittest/unix_socket_client_test.cpp", 33 ] 34 include_dirs = [ "${OHOS_PROFILER_DIR}/device/services/ipc/include" ] 35 deps = [ 36 "${OHOS_PROFILER_DIR}/device/services/shared_memory:shared_memory_source", 37 "${OHOS_PROFILER_DIR}/protos/services:plugin_service_proto", 38 "${OHOS_PROFILER_DIR}/protos/services:profiler_service_all_type_source", 39 "../:ipc", 40 ] 41 cflags = [ 42 "-Wno-inconsistent-missing-override", 43 "-Dprivate=public", #allow test code access private members 44 "-Dprotected=public", #allow test code access private members 45 ] 46 external_deps = [ 47 "googletest:gtest", 48 "hilog:libhilog_base", 49 "protobuf:protobuf_lite", 50 ] 51 subsystem_name = "${OHOS_PROFILER_SUBSYS_NAME}" 52} 53 54group("unittest") { 55 testonly = true 56 deps = [ ":ipc_ut" ] 57} 58