• 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    "${services_path}/distributedfiledaemon/include",
23    "${dsoftbus_path}/interfaces/kits/bus_center",
24    "${dsoftbus_path}/interfaces/kits/common",
25    "//third_party/json/include",
26  ]
27}
28
29ohos_moduletest("DistributedFileDaemonServiceTest") {
30  module_out_path = module_output_path
31
32  sources = [
33    "${services_path}/distributedfiledaemon/src/device/device_info.cpp",
34    "${services_path}/distributedfiledaemon/src/device/device_manager_agent.cpp",
35    "${services_path}/distributedfiledaemon/src/ipc/daemon.cpp",
36    "${services_path}/distributedfiledaemon/src/ipc/daemon_stub.cpp",
37    "${services_path}/distributedfiledaemon/src/mountpoint/mount_manager.cpp",
38    "${services_path}/distributedfiledaemon/src/mountpoint/mount_point.cpp",
39    "${services_path}/distributedfiledaemon/src/multiuser/os_account_observer.cpp",
40    "${services_path}/distributedfiledaemon/src/network/devsl_dispatcher.cpp",
41    "${services_path}/distributedfiledaemon/src/network/kernel_talker.cpp",
42    "${services_path}/distributedfiledaemon/src/network/network_agent_template.cpp",
43    "${services_path}/distributedfiledaemon/src/network/session_pool.cpp",
44    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_agent.cpp",
45    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_session.cpp",
46    "${services_path}/distributedfiledaemon/src/network/softbus/softbus_session_dispatcher.cpp",
47  ]
48
49  sources += [ "src/distributedfiledaemon_service_test.cpp" ]
50
51  configs = [
52    ":module_private_config",
53    "${utils_path}:compiler_configs",
54  ]
55
56  defines = [
57    "private=public",
58    "LOG_TAG=\"distributedfileTest\"",
59  ]
60
61  deps = [
62    "${services_path}/distributedfiledaemon:libdistributedfiledaemon",
63    "${utils_path}:libdistributedfileutils",
64    "//third_party/googletest:gmock",
65    "//third_party/googletest:gtest_main",
66  ]
67
68  external_deps = [
69    "ability_base:want",
70    "common_event_service:cesfwk_innerkits",
71    "dataclassification:data_transit_mgr",
72    "device_auth:deviceauth_sdk",
73    "device_manager:devicemanagersdk",
74    "dsoftbus:softbus_client",
75    "hilog:libhilog",
76    "init:libbegetutil",
77    "ipc:ipc_core",
78    "safwk:system_ability_fwk",
79    "samgr:samgr_proxy",
80  ]
81}
82