1# Copyright (c) 2022 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/ohos.gni") 15import("//foundation/ability/idl_tool/idl_config.gni") 16import("//foundation/ability/idl_tool/idl_tool.gni") 17 18idl_gen_interface("native_idl_test_service") { 19 sources = [ "IIdlTestService.idl" ] 20 sanitize = { 21 cfi = false 22 cfi_cross_dso = false 23 debug = false 24 } 25 innerapi_tags = [ "platformsdk" ] 26 subsystem_name = "ability" 27 part_name = "idl_tool" 28 log_domainid = "0xD003900" 29 log_tag = "NativeIdlTestService" 30} 31 32config("ipc_test_config") { 33 include_dirs = [ "include" ] 34} 35 36ohos_executable("idl_server_test") { 37 sources = [ 38 "./src/main_server.cpp", 39 "./src/test_service.cpp", 40 ] 41 42 configs = [ ":ipc_test_config" ] 43 44 deps = [ ":libnative_idl_test_service_stub" ] 45 46 external_deps = [ 47 "c_utils:utils", 48 "hilog:libhilog", 49 "ipc:ipc_core", 50 "ipc:ipc_single", 51 "samgr:samgr_proxy", 52 ] 53 54 subsystem_name = "ability" 55 part_name = "idl_tool" 56} 57 58ohos_executable("idl_client_test") { 59 sources = [ 60 "./src/main_client.cpp", 61 "./src/test_client.cpp", 62 ] 63 64 configs = [ ":ipc_test_config" ] 65 66 deps = [ ":libnative_idl_test_service_proxy" ] 67 68 external_deps = [ 69 "c_utils:utils", 70 "hilog:libhilog", 71 "ipc:ipc_core", 72 "ipc:ipc_single", 73 "samgr:samgr_proxy", 74 ] 75 76 subsystem_name = "ability" 77 part_name = "idl_tool" 78} 79 80group("unittest") { 81 testonly = true 82 83 deps = [ 84 ":idl_client_test", 85 ":idl_server_test", 86 ] 87} 88