1# Copyright (C) 2025 Huawei Device Co., Ltd. 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("../../../config.gni") 16 17SUBSYSTEM_DIR = "../../../" 18MODULE_OUTPUT_PATH = "ipc/rpc" 19 20ohos_moduletest("rpc_client_test") { 21 module_out_path = MODULE_OUTPUT_PATH 22 include_dirs = [ 23 "include", 24 "${SUBSYSTEM_DIR}/utils/include", 25 "${SUBSYSTEM_DIR}/dbinder/dbinder_service/include", 26 ] 27 sources = [ 28 "src/rpc_client_test.cpp", 29 "src/rpc_test_service_death_recipient.cpp", 30 "src/rpc_test_service_proxy.cpp", 31 ] 32 configs = [ 33 "$SUBSYSTEM_DIR/config:dsoftbus_header_deps_config", 34 "$SUBSYSTEM_DIR/config:ipc_util_config", 35 ] 36 37 deps = [ "$SUBSYSTEM_DIR/interfaces/innerkits/ipc_core:ipc_core" ] 38 external_deps = [ 39 "access_token:libnativetoken_shared", 40 "access_token:libtokensetproc_shared", 41 "c_utils:utils", 42 "dsoftbus:softbus_client", 43 "hilog:libhilog", 44 "samgr:samgr_proxy", 45 ] 46} 47 48ohos_moduletest("rpc_server_test") { 49 module_out_path = MODULE_OUTPUT_PATH 50 include_dirs = [ 51 "include", 52 "${SUBSYSTEM_DIR}/utils/include", 53 "${SUBSYSTEM_DIR}/dbinder/dbinder_service/include", 54 ] 55 sources = [ 56 "src/rpc_server_test.cpp", 57 "src/rpc_test_service_death_recipient.cpp", 58 "src/rpc_test_service_proxy.cpp", 59 "src/rpc_test_service_stub.cpp", 60 ] 61 configs = [ "$SUBSYSTEM_DIR/config:ipc_util_config" ] 62 63 deps = [ "$SUBSYSTEM_DIR/interfaces/innerkits/ipc_core:ipc_core" ] 64 external_deps = [ 65 "access_token:libnativetoken_shared", 66 "access_token:libtokensetproc_shared", 67 "c_utils:utils", 68 "hilog:libhilog", 69 "samgr:samgr_proxy", 70 ] 71} 72 73############################################################################### 74group("rpcModuletest") { 75 testonly = true 76 if (ipc_feature_test_enabled) { 77 deps = [ 78 ":rpc_client_test", 79 ":rpc_server_test", 80 ] 81 } 82} 83 84############################################################################### 85 86