1cb7eb8c9Sopenharmony_ci# Copyright (C) 2021-2024 Huawei Device Co., Ltd. 2cb7eb8c9Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License"); 3cb7eb8c9Sopenharmony_ci# you may not use this file except in compliance with the License. 4cb7eb8c9Sopenharmony_ci# You may obtain a copy of the License at 5cb7eb8c9Sopenharmony_ci# 6cb7eb8c9Sopenharmony_ci# http://www.apache.org/licenses/LICENSE-2.0 7cb7eb8c9Sopenharmony_ci# 8cb7eb8c9Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software 9cb7eb8c9Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS, 10cb7eb8c9Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11cb7eb8c9Sopenharmony_ci# See the License for the specific language governing permissions and 12cb7eb8c9Sopenharmony_ci# limitations under the License. 13cb7eb8c9Sopenharmony_ciimport("//build/test.gni") 14cb7eb8c9Sopenharmony_ciimport("//foundation/filemanagement/dfs_service/distributedfile.gni") 15cb7eb8c9Sopenharmony_ci 16cb7eb8c9Sopenharmony_cimodule_output_path = "filemanagement/dfs_service/" 17cb7eb8c9Sopenharmony_ci 18cb7eb8c9Sopenharmony_ciconfig("module_private_config") { 19cb7eb8c9Sopenharmony_ci visibility = [ ":*" ] 20cb7eb8c9Sopenharmony_ci 21cb7eb8c9Sopenharmony_ci include_dirs = [ 22cb7eb8c9Sopenharmony_ci "${distributedfile_path}/frameworks/native/distributed_file_inner/include", 23cb7eb8c9Sopenharmony_ci "${services_path}/distributedfiledaemon/include", 24cb7eb8c9Sopenharmony_ci "${services_path}/distributedfiledaemon/include/ipc", 25cb7eb8c9Sopenharmony_ci "${dsoftbus_path}/interfaces/kits/bus_center", 26cb7eb8c9Sopenharmony_ci "${dsoftbus_path}/interfaces/kits/common", 27cb7eb8c9Sopenharmony_ci "//third_party/json/include", 28cb7eb8c9Sopenharmony_ci ] 29cb7eb8c9Sopenharmony_ci} 30cb7eb8c9Sopenharmony_ci 31cb7eb8c9Sopenharmony_ciohos_moduletest("DistributedFileDaemonServiceTest") { 32cb7eb8c9Sopenharmony_ci module_out_path = module_output_path 33cb7eb8c9Sopenharmony_ci 34cb7eb8c9Sopenharmony_ci sources = [ 35cb7eb8c9Sopenharmony_ci "${distributedfile_path}/frameworks/native/distributed_file_inner/src/asset/asset_obj.cpp", 36cb7eb8c9Sopenharmony_ci "${services_path}/distributedfiledaemon/src/device/device_info.cpp", 37cb7eb8c9Sopenharmony_ci "${services_path}/distributedfiledaemon/src/device/device_manager_agent.cpp", 38cb7eb8c9Sopenharmony_ci "${services_path}/distributedfiledaemon/src/ipc/asset_callback_manager.cpp", 39cb7eb8c9Sopenharmony_ci "${services_path}/distributedfiledaemon/src/ipc/asset_recv_callback_proxy.cpp", 40cb7eb8c9Sopenharmony_ci "${services_path}/distributedfiledaemon/src/ipc/asset_send_callback_proxy.cpp", 41cb7eb8c9Sopenharmony_ci "${services_path}/distributedfiledaemon/src/ipc/connection_detector.cpp", 42cb7eb8c9Sopenharmony_ci "${services_path}/distributedfiledaemon/src/ipc/daemon.cpp", 43cb7eb8c9Sopenharmony_ci "${services_path}/distributedfiledaemon/src/ipc/daemon_eventhandler.cpp", 44cb7eb8c9Sopenharmony_ci "${services_path}/distributedfiledaemon/src/ipc/daemon_execute.cpp", 45cb7eb8c9Sopenharmony_ci "${services_path}/distributedfiledaemon/src/ipc/daemon_stub.cpp", 46cb7eb8c9Sopenharmony_ci "${services_path}/distributedfiledaemon/src/ipc/file_trans_listener_proxy.cpp", 47cb7eb8c9Sopenharmony_ci "${services_path}/distributedfiledaemon/src/ipc/trans_mananger.cpp", 48cb7eb8c9Sopenharmony_ci "${services_path}/distributedfiledaemon/src/mountpoint/mount_manager.cpp", 49cb7eb8c9Sopenharmony_ci "${services_path}/distributedfiledaemon/src/mountpoint/mount_point.cpp", 50cb7eb8c9Sopenharmony_ci "${services_path}/distributedfiledaemon/src/multiuser/os_account_observer.cpp", 51cb7eb8c9Sopenharmony_ci "${services_path}/distributedfiledaemon/src/network/devsl_dispatcher.cpp", 52cb7eb8c9Sopenharmony_ci "${services_path}/distributedfiledaemon/src/network/kernel_talker.cpp", 53cb7eb8c9Sopenharmony_ci "${services_path}/distributedfiledaemon/src/network/network_agent_template.cpp", 54cb7eb8c9Sopenharmony_ci "${services_path}/distributedfiledaemon/src/network/session_pool.cpp", 55cb7eb8c9Sopenharmony_ci "${services_path}/distributedfiledaemon/src/network/softbus/softbus_agent.cpp", 56cb7eb8c9Sopenharmony_ci "${services_path}/distributedfiledaemon/src/network/softbus/softbus_asset_recv_listener.cpp", 57cb7eb8c9Sopenharmony_ci "${services_path}/distributedfiledaemon/src/network/softbus/softbus_asset_send_listener.cpp", 58cb7eb8c9Sopenharmony_ci "${services_path}/distributedfiledaemon/src/network/softbus/softbus_file_receive_listener.cpp", 59cb7eb8c9Sopenharmony_ci "${services_path}/distributedfiledaemon/src/network/softbus/softbus_file_send_listener.cpp", 60cb7eb8c9Sopenharmony_ci "${services_path}/distributedfiledaemon/src/network/softbus/softbus_handler.cpp", 61cb7eb8c9Sopenharmony_ci "${services_path}/distributedfiledaemon/src/network/softbus/softbus_handler_asset.cpp", 62cb7eb8c9Sopenharmony_ci "${services_path}/distributedfiledaemon/src/network/softbus/softbus_session.cpp", 63cb7eb8c9Sopenharmony_ci "${services_path}/distributedfiledaemon/src/network/softbus/softbus_session_dispatcher.cpp", 64cb7eb8c9Sopenharmony_ci "${services_path}/distributedfiledaemon/src/network/softbus/softbus_session_listener.cpp", 65cb7eb8c9Sopenharmony_ci "${services_path}/distributedfiledaemon/src/network/softbus/softbus_session_pool.cpp", 66cb7eb8c9Sopenharmony_ci ] 67cb7eb8c9Sopenharmony_ci 68cb7eb8c9Sopenharmony_ci sources += [ "src/distributedfiledaemon_service_test.cpp" ] 69cb7eb8c9Sopenharmony_ci 70cb7eb8c9Sopenharmony_ci configs = [ 71cb7eb8c9Sopenharmony_ci ":module_private_config", 72cb7eb8c9Sopenharmony_ci "${utils_path}:compiler_configs", 73cb7eb8c9Sopenharmony_ci ] 74cb7eb8c9Sopenharmony_ci 75cb7eb8c9Sopenharmony_ci defines = [ 76cb7eb8c9Sopenharmony_ci "private=public", 77cb7eb8c9Sopenharmony_ci "LOG_TAG=\"distributedfileTest\"", 78cb7eb8c9Sopenharmony_ci ] 79cb7eb8c9Sopenharmony_ci 80cb7eb8c9Sopenharmony_ci deps = [ 81cb7eb8c9Sopenharmony_ci "${services_path}/distributedfiledaemon:libdistributedfiledaemon", 82cb7eb8c9Sopenharmony_ci "${utils_path}:libdistributedfileutils", 83cb7eb8c9Sopenharmony_ci "//third_party/googletest:gmock", 84cb7eb8c9Sopenharmony_ci "//third_party/googletest:gtest_main", 85cb7eb8c9Sopenharmony_ci ] 86cb7eb8c9Sopenharmony_ci 87cb7eb8c9Sopenharmony_ci external_deps = [ 88cb7eb8c9Sopenharmony_ci "ability_base:want", 89cb7eb8c9Sopenharmony_ci "ability_base:zuri", 90cb7eb8c9Sopenharmony_ci "access_token:libaccesstoken_sdk", 91cb7eb8c9Sopenharmony_ci "app_file_service:sandbox_helper_native", 92cb7eb8c9Sopenharmony_ci "c_utils:utils", 93cb7eb8c9Sopenharmony_ci "common_event_service:cesfwk_innerkits", 94cb7eb8c9Sopenharmony_ci "dataclassification:data_transit_mgr", 95cb7eb8c9Sopenharmony_ci "device_auth:deviceauth_sdk", 96cb7eb8c9Sopenharmony_ci "device_manager:devicemanagersdk", 97cb7eb8c9Sopenharmony_ci "dsoftbus:softbus_client", 98cb7eb8c9Sopenharmony_ci "eventhandler:libeventhandler", 99cb7eb8c9Sopenharmony_ci "hilog:libhilog", 100cb7eb8c9Sopenharmony_ci "hisysevent:libhisysevent", 101cb7eb8c9Sopenharmony_ci "init:libbegetutil", 102cb7eb8c9Sopenharmony_ci "ipc:ipc_single", 103cb7eb8c9Sopenharmony_ci "os_account:os_account_innerkits", 104cb7eb8c9Sopenharmony_ci "safwk:system_ability_fwk", 105cb7eb8c9Sopenharmony_ci "samgr:samgr_proxy", 106cb7eb8c9Sopenharmony_ci "storage_service:storage_manager_sa_proxy", 107cb7eb8c9Sopenharmony_ci "zlib:shared_libz", 108cb7eb8c9Sopenharmony_ci ] 109cb7eb8c9Sopenharmony_ci} 110