1# Copyright (C) 2021-2024 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. 13import("//build/test.gni") 14import("//foundation/filemanagement/dfs_service/distributedfile.gni") 15 16module_output_path = "filemanagement/dfs_service/" 17 18config("module_private_config") { 19 visibility = [ ":*" ] 20 21 include_dirs = [ 22 "${distributedfile_path}/frameworks/native/distributed_file_inner/include", 23 "${services_path}/distributedfiledaemon/include", 24 "${services_path}/distributedfiledaemon/include/ipc", 25 "${dsoftbus_path}/interfaces/kits/bus_center", 26 "${dsoftbus_path}/interfaces/kits/common", 27 "//third_party/json/include", 28 ] 29} 30 31ohos_moduletest("DistributedFileDaemonServiceTest") { 32 module_out_path = module_output_path 33 34 sources = [ 35 "${distributedfile_path}/frameworks/native/distributed_file_inner/src/asset/asset_obj.cpp", 36 "${services_path}/distributedfiledaemon/src/device/device_info.cpp", 37 "${services_path}/distributedfiledaemon/src/device/device_manager_agent.cpp", 38 "${services_path}/distributedfiledaemon/src/ipc/asset_callback_manager.cpp", 39 "${services_path}/distributedfiledaemon/src/ipc/asset_recv_callback_proxy.cpp", 40 "${services_path}/distributedfiledaemon/src/ipc/asset_send_callback_proxy.cpp", 41 "${services_path}/distributedfiledaemon/src/ipc/connection_detector.cpp", 42 "${services_path}/distributedfiledaemon/src/ipc/daemon.cpp", 43 "${services_path}/distributedfiledaemon/src/ipc/daemon_eventhandler.cpp", 44 "${services_path}/distributedfiledaemon/src/ipc/daemon_execute.cpp", 45 "${services_path}/distributedfiledaemon/src/ipc/daemon_stub.cpp", 46 "${services_path}/distributedfiledaemon/src/ipc/file_trans_listener_proxy.cpp", 47 "${services_path}/distributedfiledaemon/src/ipc/trans_mananger.cpp", 48 "${services_path}/distributedfiledaemon/src/mountpoint/mount_manager.cpp", 49 "${services_path}/distributedfiledaemon/src/mountpoint/mount_point.cpp", 50 "${services_path}/distributedfiledaemon/src/multiuser/os_account_observer.cpp", 51 "${services_path}/distributedfiledaemon/src/network/devsl_dispatcher.cpp", 52 "${services_path}/distributedfiledaemon/src/network/kernel_talker.cpp", 53 "${services_path}/distributedfiledaemon/src/network/network_agent_template.cpp", 54 "${services_path}/distributedfiledaemon/src/network/session_pool.cpp", 55 "${services_path}/distributedfiledaemon/src/network/softbus/softbus_agent.cpp", 56 "${services_path}/distributedfiledaemon/src/network/softbus/softbus_asset_recv_listener.cpp", 57 "${services_path}/distributedfiledaemon/src/network/softbus/softbus_asset_send_listener.cpp", 58 "${services_path}/distributedfiledaemon/src/network/softbus/softbus_file_receive_listener.cpp", 59 "${services_path}/distributedfiledaemon/src/network/softbus/softbus_file_send_listener.cpp", 60 "${services_path}/distributedfiledaemon/src/network/softbus/softbus_handler.cpp", 61 "${services_path}/distributedfiledaemon/src/network/softbus/softbus_handler_asset.cpp", 62 "${services_path}/distributedfiledaemon/src/network/softbus/softbus_session.cpp", 63 "${services_path}/distributedfiledaemon/src/network/softbus/softbus_session_dispatcher.cpp", 64 "${services_path}/distributedfiledaemon/src/network/softbus/softbus_session_listener.cpp", 65 "${services_path}/distributedfiledaemon/src/network/softbus/softbus_session_pool.cpp", 66 ] 67 68 sources += [ "src/distributedfiledaemon_service_test.cpp" ] 69 70 configs = [ 71 ":module_private_config", 72 "${utils_path}:compiler_configs", 73 ] 74 75 defines = [ 76 "private=public", 77 "LOG_TAG=\"distributedfileTest\"", 78 ] 79 80 deps = [ 81 "${services_path}/distributedfiledaemon:libdistributedfiledaemon", 82 "${utils_path}:libdistributedfileutils", 83 "//third_party/googletest:gmock", 84 "//third_party/googletest:gtest_main", 85 ] 86 87 external_deps = [ 88 "ability_base:want", 89 "ability_base:zuri", 90 "access_token:libaccesstoken_sdk", 91 "app_file_service:sandbox_helper_native", 92 "c_utils:utils", 93 "common_event_service:cesfwk_innerkits", 94 "dataclassification:data_transit_mgr", 95 "device_auth:deviceauth_sdk", 96 "device_manager:devicemanagersdk", 97 "dsoftbus:softbus_client", 98 "eventhandler:libeventhandler", 99 "hilog:libhilog", 100 "hisysevent:libhisysevent", 101 "init:libbegetutil", 102 "ipc:ipc_single", 103 "os_account:os_account_innerkits", 104 "safwk:system_ability_fwk", 105 "samgr:samgr_proxy", 106 "storage_service:storage_manager_sa_proxy", 107 "zlib:shared_libz", 108 ] 109} 110