• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (C) 2021 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    "${services_path}/distributedfiledaemon/src/device/device_info.cpp",
36    "${services_path}/distributedfiledaemon/src/device/device_manager_agent.cpp",
37    "${services_path}/distributedfiledaemon/src/ipc/connection_detector.cpp",
38    "${services_path}/distributedfiledaemon/src/ipc/daemon.cpp",
39    "${services_path}/distributedfiledaemon/src/ipc/daemon_stub.cpp",
40    "${services_path}/distributedfiledaemon/src/ipc/file_trans_listener_proxy.cpp",
41    "${services_path}/distributedfiledaemon/src/ipc/trans_mananger.cpp",
42    "${services_path}/distributedfiledaemon/src/mountpoint/mount_manager.cpp",
43    "${services_path}/distributedfiledaemon/src/mountpoint/mount_point.cpp",
44    "${services_path}/distributedfiledaemon/src/multiuser/os_account_observer.cpp",
45    "${services_path}/distributedfiledaemon/src/network/devsl_dispatcher.cpp",
46    "${services_path}/distributedfiledaemon/src/network/kernel_talker.cpp",
47    "${services_path}/distributedfiledaemon/src/network/network_agent_template.cpp",
48    "${services_path}/distributedfiledaemon/src/network/session_pool.cpp",
49    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_agent.cpp",
50    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_file_receive_listener.cpp",
51    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_file_send_listener.cpp",
52    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_handler.cpp",
53    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_session.cpp",
54    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_session_dispatcher.cpp",
55    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_session_listener.cpp",
56    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_session_pool.cpp",
57  ]
58
59  sources += [ "src/distributedfiledaemon_service_test.cpp" ]
60
61  configs = [
62    ":module_private_config",
63    "${utils_path}:compiler_configs",
64  ]
65
66  defines = [
67    "private=public",
68    "LOG_TAG=\"distributedfileTest\"",
69  ]
70
71  deps = [
72    "${services_path}/distributedfiledaemon:libdistributedfiledaemon",
73    "${utils_path}:libdistributedfileutils",
74    "//third_party/googletest:gmock",
75    "//third_party/googletest:gtest_main",
76  ]
77
78  external_deps = [
79    "ability_base:want",
80    "ability_base:zuri",
81    "access_token:libaccesstoken_sdk",
82    "app_file_service:sandbox_helper_native",
83    "common_event_service:cesfwk_innerkits",
84    "dataclassification:data_transit_mgr",
85    "device_auth:deviceauth_sdk",
86    "device_manager:devicemanagersdk",
87    "dsoftbus:softbus_client",
88    "hilog:libhilog",
89    "init:libbegetutil",
90    "ipc:ipc_core",
91    "os_account:os_account_innerkits",
92    "safwk:system_ability_fwk",
93    "samgr:samgr_proxy",
94  ]
95}
96