# Copyright (c) 2022 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/ohos.gni") import("//foundation/ability/idl_tool/idl_config.gni") import("//foundation/ability/idl_tool/idl_tool.gni") idl_gen_interface("native_idl_test_service") { sources = [ "IIdlTestService.idl" ] sanitize = { cfi = false cfi_cross_dso = false debug = false } innerapi_tags = [ "platformsdk" ] subsystem_name = "ability" part_name = "idl_tool" log_domainid = "0xD003900" log_tag = "NativeIdlTestService" } config("ipc_test_config") { include_dirs = [ "include" ] } ohos_executable("idl_server_test") { sources = [ "./src/main_server.cpp", "./src/test_service.cpp", ] configs = [ ":ipc_test_config" ] deps = [ ":libnative_idl_test_service_stub" ] external_deps = [ "c_utils:utils", "hilog:libhilog", "ipc:ipc_core", "ipc:ipc_single", "samgr:samgr_proxy", ] subsystem_name = "ability" part_name = "idl_tool" } ohos_executable("idl_client_test") { sources = [ "./src/main_client.cpp", "./src/test_client.cpp", ] configs = [ ":ipc_test_config" ] deps = [ ":libnative_idl_test_service_proxy" ] external_deps = [ "c_utils:utils", "hilog:libhilog", "ipc:ipc_core", "ipc:ipc_single", "samgr:samgr_proxy", ] subsystem_name = "ability" part_name = "idl_tool" } group("unittest") { testonly = true deps = [ ":idl_client_test", ":idl_server_test", ] }