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/lite/config/component/lite_component.gni") 15import("//build/ohos.gni") 16import("//build/test.gni") 17import("//foundation/communication/dsoftbus/dsoftbus.gni") 18import("//foundation/communication/dsoftbus/tests/utils/utils.gni") 19 20module_output_path = "dsoftbus/discovery" 21 22ohos_unittest("DiscClientProxyTest") { 23 module_out_path = module_output_path 24 sources = [ 25 "$dsoftbus_core_path/discovery/ipc/standard/src/disc_client_proxy.cpp", 26 "$dsoftbus_core_path/discovery/ipc/standard/src/disc_client_proxy_standard.cpp", 27 "$dsoftbus_root_path/sdk/frame/standard/src/if_softbus_client.cpp", 28 "client_info_manager_mock.cpp", 29 "disc_client_proxy_test.cpp", 30 "remote_object_mock.cpp", 31 ] 32 sources += test_utils_src 33 34 include_dirs = [ 35 "$dsoftbus_core_path/discovery/ipc/include", 36 "$dsoftbus_core_path/discovery/ipc/standard/include", 37 "$dsoftbus_root_path/interfaces/kits/common", 38 "$dsoftbus_root_path/interfaces/kits/discovery", 39 "$dsoftbus_root_path/sdk/frame/standard/include/", 40 "$dsoftbus_core_path/common/include", 41 "$dsoftbus_core_path/frame/standard/client_manager/include", 42 "$softbus_adapter_common/include", 43 ] 44 include_dirs += test_utils_inc 45 46 deps = [ 47 "//third_party/googletest:gmock", 48 "//third_party/googletest:gtest_main", 49 ] 50 51 if (is_standard_system) { 52 external_deps = [ 53 "c_utils:utils", 54 "hiviewdfx_hilog_native:libhilog", 55 ] 56 } else { 57 external_deps = [ 58 "c_utils:utils", 59 "hilog:libhilog", 60 ] 61 } 62 external_deps += [ "ipc:ipc_core" ] 63} 64 65group("unittest") { 66 testonly = true 67 deps = [ ":DiscClientProxyTest" ] 68} 69