1cb7eb8c9Sopenharmony_ci# Copyright (C) 2023 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_ci
14cb7eb8c9Sopenharmony_ciimport("//build/test.gni")
15cb7eb8c9Sopenharmony_ciimport("//foundation/filemanagement/dfs_service/distributedfile.gni")
16cb7eb8c9Sopenharmony_ci
17cb7eb8c9Sopenharmony_ciohos_unittest("cloud_daemon_manager_test") {
18cb7eb8c9Sopenharmony_ci  module_out_path = "filemanagement/dfs_service"
19cb7eb8c9Sopenharmony_ci
20cb7eb8c9Sopenharmony_ci  sources = [
21cb7eb8c9Sopenharmony_ci    "${distributedfile_path}/frameworks/native/cloud_daemon_kit_inner/src/cloud_daemon_manager_impl.cpp",
22cb7eb8c9Sopenharmony_ci    "${distributedfile_path}/frameworks/native/cloud_daemon_kit_inner/src/cloud_daemon_service_proxy.cpp",
23cb7eb8c9Sopenharmony_ci    "../../mock/cloud_daemon_manager_mock.cpp",
24cb7eb8c9Sopenharmony_ci    "cloud_daemon_manager_test.cpp",
25cb7eb8c9Sopenharmony_ci  ]
26cb7eb8c9Sopenharmony_ci
27cb7eb8c9Sopenharmony_ci  include_dirs = [
28cb7eb8c9Sopenharmony_ci    "${distributedfile_path}/utils/log/include",
29cb7eb8c9Sopenharmony_ci    "${distributedfile_path}/frameworks/native/cloud_daemon_kit_inner/include",
30cb7eb8c9Sopenharmony_ci    "${distributedfile_path}/interfaces/inner_api/native/cloud_daemon_kit_inner",
31cb7eb8c9Sopenharmony_ci  ]
32cb7eb8c9Sopenharmony_ci
33cb7eb8c9Sopenharmony_ci  deps = [
34cb7eb8c9Sopenharmony_ci    "${services_path}/distributedfiledaemon:libdistributedfiledaemon",
35cb7eb8c9Sopenharmony_ci    "${utils_path}:libdistributedfileutils",
36cb7eb8c9Sopenharmony_ci    "//third_party/googletest:gmock_main",
37cb7eb8c9Sopenharmony_ci    "//third_party/googletest:gtest_main",
38cb7eb8c9Sopenharmony_ci  ]
39cb7eb8c9Sopenharmony_ci
40cb7eb8c9Sopenharmony_ci  external_deps = [
41cb7eb8c9Sopenharmony_ci    "c_utils:utils",
42cb7eb8c9Sopenharmony_ci    "hilog:libhilog",
43cb7eb8c9Sopenharmony_ci    "ipc:ipc_single",
44cb7eb8c9Sopenharmony_ci    "safwk:system_ability_fwk",
45cb7eb8c9Sopenharmony_ci    "samgr:samgr_proxy",
46cb7eb8c9Sopenharmony_ci  ]
47cb7eb8c9Sopenharmony_ci
48cb7eb8c9Sopenharmony_ci  defines = [
49cb7eb8c9Sopenharmony_ci    "private=public",
50cb7eb8c9Sopenharmony_ci    "LOG_DOMAIN=0xD004308",
51cb7eb8c9Sopenharmony_ci    "LOG_TAG=\"CLOUD_DAEMON_API\"",
52cb7eb8c9Sopenharmony_ci  ]
53cb7eb8c9Sopenharmony_ci
54cb7eb8c9Sopenharmony_ci  use_exceptions = true
55cb7eb8c9Sopenharmony_ci}
56cb7eb8c9Sopenharmony_ci
57cb7eb8c9Sopenharmony_ciohos_unittest("cloud_daemon_manager_impl_test") {
58cb7eb8c9Sopenharmony_ci  module_out_path = "filemanagement/dfs_service"
59cb7eb8c9Sopenharmony_ci
60cb7eb8c9Sopenharmony_ci  sources = [
61cb7eb8c9Sopenharmony_ci    "${distributedfile_path}/frameworks/native/cloud_daemon_kit_inner/src/cloud_daemon_manager_impl.cpp",
62cb7eb8c9Sopenharmony_ci    "${distributedfile_path}/frameworks/native/cloud_daemon_kit_inner/src/cloud_daemon_service_proxy.cpp",
63cb7eb8c9Sopenharmony_ci    "cloud_daemon_manager_impl_test.cpp",
64cb7eb8c9Sopenharmony_ci  ]
65cb7eb8c9Sopenharmony_ci
66cb7eb8c9Sopenharmony_ci  include_dirs = [
67cb7eb8c9Sopenharmony_ci    "${distributedfile_path}/utils/log/include",
68cb7eb8c9Sopenharmony_ci    "${distributedfile_path}/frameworks/native/cloud_daemon_kit_inner/include",
69cb7eb8c9Sopenharmony_ci    "${distributedfile_path}/interfaces/inner_api/native/cloud_daemon_kit_inner",
70cb7eb8c9Sopenharmony_ci  ]
71cb7eb8c9Sopenharmony_ci
72cb7eb8c9Sopenharmony_ci  deps = [
73cb7eb8c9Sopenharmony_ci    "${services_path}/distributedfiledaemon:libdistributedfiledaemon",
74cb7eb8c9Sopenharmony_ci    "${utils_path}:libdistributedfileutils",
75cb7eb8c9Sopenharmony_ci    "//third_party/googletest:gmock_main",
76cb7eb8c9Sopenharmony_ci    "//third_party/googletest:gtest_main",
77cb7eb8c9Sopenharmony_ci  ]
78cb7eb8c9Sopenharmony_ci
79cb7eb8c9Sopenharmony_ci  external_deps = [
80cb7eb8c9Sopenharmony_ci    "c_utils:utils",
81cb7eb8c9Sopenharmony_ci    "hilog:libhilog",
82cb7eb8c9Sopenharmony_ci    "ipc:ipc_single",
83cb7eb8c9Sopenharmony_ci    "safwk:system_ability_fwk",
84cb7eb8c9Sopenharmony_ci    "samgr:samgr_proxy",
85cb7eb8c9Sopenharmony_ci  ]
86cb7eb8c9Sopenharmony_ci
87cb7eb8c9Sopenharmony_ci  defines = [
88cb7eb8c9Sopenharmony_ci    "private=public",
89cb7eb8c9Sopenharmony_ci    "LOG_DOMAIN=0xD004308",
90cb7eb8c9Sopenharmony_ci    "LOG_TAG=\"CLOUD_DAEMON_API\"",
91cb7eb8c9Sopenharmony_ci  ]
92cb7eb8c9Sopenharmony_ci
93cb7eb8c9Sopenharmony_ci  use_exceptions = true
94cb7eb8c9Sopenharmony_ci}
95cb7eb8c9Sopenharmony_ci
96cb7eb8c9Sopenharmony_ciohos_unittest("cloud_daemon_service_proxy_test") {
97cb7eb8c9Sopenharmony_ci  module_out_path = "filemanagement/dfs_service"
98cb7eb8c9Sopenharmony_ci
99cb7eb8c9Sopenharmony_ci  sources = [
100cb7eb8c9Sopenharmony_ci    "${distributedfile_path}/frameworks/native/cloud_daemon_kit_inner/src/cloud_daemon_service_proxy.cpp",
101cb7eb8c9Sopenharmony_ci    "cloud_daemon_service_proxy_test.cpp",
102cb7eb8c9Sopenharmony_ci  ]
103cb7eb8c9Sopenharmony_ci
104cb7eb8c9Sopenharmony_ci  include_dirs = [
105cb7eb8c9Sopenharmony_ci    "${distributedfile_path}/utils/log/include",
106cb7eb8c9Sopenharmony_ci    "${distributedfile_path}/frameworks/native/cloud_daemon_kit_inner/include",
107cb7eb8c9Sopenharmony_ci    "${distributedfile_path}/interfaces/inner_api/native/cloud_daemon_kit_inner",
108cb7eb8c9Sopenharmony_ci    "${distributedfile_path}/test/unittests/cloud_daemon/include",
109cb7eb8c9Sopenharmony_ci    "../../../../../systemabilitymgr/samgr/interfaces/innerkits/samgr_proxy/include",
110cb7eb8c9Sopenharmony_ci    "../../../../../communication/ipc/interfaces/innerkits/ipc_core/include",
111cb7eb8c9Sopenharmony_ci  ]
112cb7eb8c9Sopenharmony_ci
113cb7eb8c9Sopenharmony_ci  deps = [
114cb7eb8c9Sopenharmony_ci    "${utils_path}:libdistributedfileutils",
115cb7eb8c9Sopenharmony_ci    "//third_party/googletest:gmock_main",
116cb7eb8c9Sopenharmony_ci    "//third_party/googletest:gtest_main",
117cb7eb8c9Sopenharmony_ci  ]
118cb7eb8c9Sopenharmony_ci
119cb7eb8c9Sopenharmony_ci  external_deps = [
120cb7eb8c9Sopenharmony_ci    "c_utils:utils",
121cb7eb8c9Sopenharmony_ci    "hilog:libhilog",
122cb7eb8c9Sopenharmony_ci    "ipc:ipc_single",
123cb7eb8c9Sopenharmony_ci  ]
124cb7eb8c9Sopenharmony_ci
125cb7eb8c9Sopenharmony_ci  defines = [
126cb7eb8c9Sopenharmony_ci    "private=public",
127cb7eb8c9Sopenharmony_ci    "LOG_DOMAIN=0xD004308",
128cb7eb8c9Sopenharmony_ci    "LOG_TAG=\"CLOUD_DAEMON_API\"",
129cb7eb8c9Sopenharmony_ci  ]
130cb7eb8c9Sopenharmony_ci
131cb7eb8c9Sopenharmony_ci  use_exceptions = true
132cb7eb8c9Sopenharmony_ci}
133cb7eb8c9Sopenharmony_ci
134cb7eb8c9Sopenharmony_cigroup("cloud_daemon_test") {
135cb7eb8c9Sopenharmony_ci  testonly = true
136cb7eb8c9Sopenharmony_ci
137cb7eb8c9Sopenharmony_ci  deps = [
138cb7eb8c9Sopenharmony_ci    ":cloud_daemon_manager_impl_test",
139cb7eb8c9Sopenharmony_ci    ":cloud_daemon_manager_test",
140cb7eb8c9Sopenharmony_ci    ":cloud_daemon_service_proxy_test",
141cb7eb8c9Sopenharmony_ci  ]
142cb7eb8c9Sopenharmony_ci}
143