1cb7eb8c9Sopenharmony_ci# Copyright (C) 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_ci
14cb7eb8c9Sopenharmony_ciimport("//build/test.gni")
15cb7eb8c9Sopenharmony_ciimport("//foundation/filemanagement/dfs_service/distributedfile.gni")
16cb7eb8c9Sopenharmony_ci
17cb7eb8c9Sopenharmony_ciohos_unittest("account_status_listener_test") {
18cb7eb8c9Sopenharmony_ci  module_out_path = "filemanagement/dfs_service"
19cb7eb8c9Sopenharmony_ci
20cb7eb8c9Sopenharmony_ci  include_dirs = [
21cb7eb8c9Sopenharmony_ci    "${distributedfile_path}/utils/log/include",
22cb7eb8c9Sopenharmony_ci    "${services_path}/cloudfiledaemon/include/cloud_disk/",
23cb7eb8c9Sopenharmony_ci    "${services_path}/cloudfiledaemon/include/fuse_manager/",
24cb7eb8c9Sopenharmony_ci  ]
25cb7eb8c9Sopenharmony_ci
26cb7eb8c9Sopenharmony_ci  sources = [
27cb7eb8c9Sopenharmony_ci    "${services_path}/cloudfiledaemon/src/cloud_disk/account_status.cpp",
28cb7eb8c9Sopenharmony_ci    "${services_path}/cloudfiledaemon/src/cloud_disk/account_status_listener.cpp",
29cb7eb8c9Sopenharmony_ci    "${services_path}/cloudfiledaemon/src/fuse_manager/cloud_daemon_statistic.cpp",
30cb7eb8c9Sopenharmony_ci    "account_status_listener_test.cpp",
31cb7eb8c9Sopenharmony_ci  ]
32cb7eb8c9Sopenharmony_ci
33cb7eb8c9Sopenharmony_ci  deps = [
34cb7eb8c9Sopenharmony_ci    "${clouddisk_database_path}:clouddisk_database",
35cb7eb8c9Sopenharmony_ci    "${utils_path}:libdistributedfiledentry",
36cb7eb8c9Sopenharmony_ci    "${utils_path}:libdistributedfileutils",
37cb7eb8c9Sopenharmony_ci    "${utils_path}:libdistributedfileutils_lite",
38cb7eb8c9Sopenharmony_ci    "//third_party/googletest:gmock_main",
39cb7eb8c9Sopenharmony_ci    "//third_party/googletest:gtest_main",
40cb7eb8c9Sopenharmony_ci  ]
41cb7eb8c9Sopenharmony_ci
42cb7eb8c9Sopenharmony_ci  external_deps = [
43cb7eb8c9Sopenharmony_ci    "ability_base:want",
44cb7eb8c9Sopenharmony_ci    "c_utils:utils",
45cb7eb8c9Sopenharmony_ci    "common_event_service:cesfwk_innerkits",
46cb7eb8c9Sopenharmony_ci    "hilog:libhilog",
47cb7eb8c9Sopenharmony_ci  ]
48cb7eb8c9Sopenharmony_ci
49cb7eb8c9Sopenharmony_ci  defines = [
50cb7eb8c9Sopenharmony_ci    "private=public",
51cb7eb8c9Sopenharmony_ci    "LOG_DOMAIN=0xD004308",
52cb7eb8c9Sopenharmony_ci    "LOG_TAG=\"CLOUD_DAEMON_API\"",
53cb7eb8c9Sopenharmony_ci  ]
54cb7eb8c9Sopenharmony_ci
55cb7eb8c9Sopenharmony_ci  use_exceptions = true
56cb7eb8c9Sopenharmony_ci}
57cb7eb8c9Sopenharmony_ci
58cb7eb8c9Sopenharmony_ciohos_unittest("file_operations_cloud_test") {
59cb7eb8c9Sopenharmony_ci  module_out_path = "filemanagement/dfs_service"
60cb7eb8c9Sopenharmony_ci
61cb7eb8c9Sopenharmony_ci  include_dirs = [
62cb7eb8c9Sopenharmony_ci    "${distributedfile_path}/adapter/cloud_adapter_example/include",
63cb7eb8c9Sopenharmony_ci    "${distributedfile_path}/interfaces/inner_api/native/cloudsync_kit_inner",
64cb7eb8c9Sopenharmony_ci    "${distributedfile_path}/utils/log/include",
65cb7eb8c9Sopenharmony_ci    "${media_library_path}/frameworks/innerkitsimpl/media_library_helper/include",
66cb7eb8c9Sopenharmony_ci    "${media_library_path}/frameworks/utils/include",
67cb7eb8c9Sopenharmony_ci    "${media_library_path}/interfaces/inner_api/media_library_helper/include",
68cb7eb8c9Sopenharmony_ci    "${services_path}/clouddisk_database/include",
69cb7eb8c9Sopenharmony_ci    "${services_path}/cloudfiledaemon/include/cloud_disk/",
70cb7eb8c9Sopenharmony_ci    "mock",
71cb7eb8c9Sopenharmony_ci  ]
72cb7eb8c9Sopenharmony_ci
73cb7eb8c9Sopenharmony_ci  sources = [
74cb7eb8c9Sopenharmony_ci    "${distributedfile_path}/test/mock/clouddisk_notify_mock.cpp",
75cb7eb8c9Sopenharmony_ci    "${distributedfile_path}/test/unittests/cloud_disk/mock/file_operations_helper_mock.cpp",
76cb7eb8c9Sopenharmony_ci    "${distributedfile_path}/test/unittests/clouddisk_database/mock/meta_file_clouddisk_mock.cpp",
77cb7eb8c9Sopenharmony_ci    "${distributedfile_path}/test/unittests/cloudsync_sa/mock/cloud_file_utils_mock.cpp",
78cb7eb8c9Sopenharmony_ci    "${services_path}/cloudfiledaemon/src/cloud_disk/account_status.cpp",
79cb7eb8c9Sopenharmony_ci    "${services_path}/cloudfiledaemon/src/cloud_disk/database_manager.cpp",
80cb7eb8c9Sopenharmony_ci    "${services_path}/cloudfiledaemon/src/cloud_disk/file_operations_base.cpp",
81cb7eb8c9Sopenharmony_ci    "${services_path}/cloudfiledaemon/src/cloud_disk/file_operations_cloud.cpp",
82cb7eb8c9Sopenharmony_ci    "file_operations_cloud_test.cpp",
83cb7eb8c9Sopenharmony_ci    "mock/clouddisk_rdbstore_mock.cpp",
84cb7eb8c9Sopenharmony_ci    "mock/libfuse_mock.cpp",
85cb7eb8c9Sopenharmony_ci    "mock/system_function_mock.cpp",
86cb7eb8c9Sopenharmony_ci  ]
87cb7eb8c9Sopenharmony_ci
88cb7eb8c9Sopenharmony_ci  deps = [
89cb7eb8c9Sopenharmony_ci    "${clouddisk_database_path}:clouddisk_database",
90cb7eb8c9Sopenharmony_ci    "${innerkits_native_path}/cloud_file_kit_inner:cloudfile_kit",
91cb7eb8c9Sopenharmony_ci    "${utils_path}:libdistributedfiledentry",
92cb7eb8c9Sopenharmony_ci    "${utils_path}:libdistributedfileutils",
93cb7eb8c9Sopenharmony_ci    "${utils_path}:libdistributedfileutils_lite",
94cb7eb8c9Sopenharmony_ci    "//third_party/googletest:gmock_main",
95cb7eb8c9Sopenharmony_ci    "//third_party/googletest:gtest_main",
96cb7eb8c9Sopenharmony_ci  ]
97cb7eb8c9Sopenharmony_ci
98cb7eb8c9Sopenharmony_ci  external_deps = [
99cb7eb8c9Sopenharmony_ci    "ability_base:want",
100cb7eb8c9Sopenharmony_ci    "ability_runtime:dataobs_manager",
101cb7eb8c9Sopenharmony_ci    "c_utils:utils",
102cb7eb8c9Sopenharmony_ci    "common_event_service:cesfwk_innerkits",
103cb7eb8c9Sopenharmony_ci    "ffrt:libffrt",
104cb7eb8c9Sopenharmony_ci    "hilog:libhilog",
105cb7eb8c9Sopenharmony_ci    "hitrace:hitrace_meter",
106cb7eb8c9Sopenharmony_ci    "init:libbegetutil",
107cb7eb8c9Sopenharmony_ci    "libfuse:libfuse",
108cb7eb8c9Sopenharmony_ci    "relational_store:native_rdb",
109cb7eb8c9Sopenharmony_ci  ]
110cb7eb8c9Sopenharmony_ci
111cb7eb8c9Sopenharmony_ci  defines = [
112cb7eb8c9Sopenharmony_ci    "private=public",
113cb7eb8c9Sopenharmony_ci    "LOG_DOMAIN=0xD004308",
114cb7eb8c9Sopenharmony_ci    "LOG_TAG=\"CLOUD_DAEMON_API\"",
115cb7eb8c9Sopenharmony_ci  ]
116cb7eb8c9Sopenharmony_ci
117cb7eb8c9Sopenharmony_ci  use_exceptions = true
118cb7eb8c9Sopenharmony_ci}
119cb7eb8c9Sopenharmony_ci
120cb7eb8c9Sopenharmony_ciohos_unittest("database_manager_test") {
121cb7eb8c9Sopenharmony_ci  module_out_path = "filemanagement/dfs_service"
122cb7eb8c9Sopenharmony_ci
123cb7eb8c9Sopenharmony_ci  include_dirs = [
124cb7eb8c9Sopenharmony_ci    "${distributedfile_path}/utils/log/include",
125cb7eb8c9Sopenharmony_ci    "${distributedfile_path}/interfaces/inner_api/native/cloudsync_kit_inner/",
126cb7eb8c9Sopenharmony_ci    "${distributedfile_path}/interfaces/inner_api/native/cloud_file_kit_inner/",
127cb7eb8c9Sopenharmony_ci    "${distributedfile_path}/frameworks/native/cloudsync_kit_inner/include/",
128cb7eb8c9Sopenharmony_ci    "${distributedfile_path}/frameworks/native/cloudsync_kit_inner_lite/include/",
129cb7eb8c9Sopenharmony_ci    "${distributedfile_path}/test/unittests/cloudsync_sa/mock/",
130cb7eb8c9Sopenharmony_ci    "${services_path}/cloudfiledaemon/include/cloud_disk/",
131cb7eb8c9Sopenharmony_ci    "${services_path}/clouddisk_database/include/",
132cb7eb8c9Sopenharmony_ci    "${media_library_path}/frameworks/innerkitsimpl/media_library_helper/include/",
133cb7eb8c9Sopenharmony_ci    "${media_library_path}/interfaces/inner_api/media_library_helper/include/",
134cb7eb8c9Sopenharmony_ci    "${media_library_path}/frameworks/utils/include/",
135cb7eb8c9Sopenharmony_ci  ]
136cb7eb8c9Sopenharmony_ci
137cb7eb8c9Sopenharmony_ci  sources = [
138cb7eb8c9Sopenharmony_ci    "${distributedfile_path}/frameworks/native/cloudsync_kit_inner/src/cloud_sync_manager.cpp",
139cb7eb8c9Sopenharmony_ci    "${services_path}/clouddisk_database/src/clouddisk_rdb_transaction.cpp",
140cb7eb8c9Sopenharmony_ci    "${services_path}/clouddisk_database/src/clouddisk_rdb_utils.cpp",
141cb7eb8c9Sopenharmony_ci    "${services_path}/clouddisk_database/src/clouddisk_rdbstore.cpp",
142cb7eb8c9Sopenharmony_ci    "${services_path}/clouddisk_database/src/clouddisk_sync_helper.cpp",
143cb7eb8c9Sopenharmony_ci    "${services_path}/clouddisk_database/src/file_column.cpp",
144cb7eb8c9Sopenharmony_ci    "${services_path}/cloudfiledaemon/src/cloud_disk/database_manager.cpp",
145cb7eb8c9Sopenharmony_ci    "database_manager_test.cpp",
146cb7eb8c9Sopenharmony_ci  ]
147cb7eb8c9Sopenharmony_ci
148cb7eb8c9Sopenharmony_ci  deps = [
149cb7eb8c9Sopenharmony_ci    "${distributedfile_path}/adapter/cloud_adapter_example:cloud_adapter",
150cb7eb8c9Sopenharmony_ci    "${innerkits_native_path}/cloudsync_kit_inner:cloudsync_kit_inner_lite",
151cb7eb8c9Sopenharmony_ci    "${utils_path}:libdistributedfiledentry",
152cb7eb8c9Sopenharmony_ci    "${utils_path}:libdistributedfileutils",
153cb7eb8c9Sopenharmony_ci    "${utils_path}:libdistributedfileutils_lite",
154cb7eb8c9Sopenharmony_ci    "//third_party/googletest:gmock_main",
155cb7eb8c9Sopenharmony_ci    "//third_party/googletest:gtest_main",
156cb7eb8c9Sopenharmony_ci  ]
157cb7eb8c9Sopenharmony_ci
158cb7eb8c9Sopenharmony_ci  external_deps = [
159cb7eb8c9Sopenharmony_ci    "ability_base:want",
160cb7eb8c9Sopenharmony_ci    "ability_base:zuri",
161cb7eb8c9Sopenharmony_ci    "ability_runtime:dataobs_manager",
162cb7eb8c9Sopenharmony_ci    "c_utils:utils",
163cb7eb8c9Sopenharmony_ci    "common_event_service:cesfwk_innerkits",
164cb7eb8c9Sopenharmony_ci    "dfs_service:cloudsync_kit_inner",
165cb7eb8c9Sopenharmony_ci    "ffrt:libffrt",
166cb7eb8c9Sopenharmony_ci    "hilog:libhilog",
167cb7eb8c9Sopenharmony_ci    "ipc:ipc_single",
168cb7eb8c9Sopenharmony_ci    "libfuse:libfuse",
169cb7eb8c9Sopenharmony_ci    "relational_store:native_rdb",
170cb7eb8c9Sopenharmony_ci  ]
171cb7eb8c9Sopenharmony_ci
172cb7eb8c9Sopenharmony_ci  defines = [
173cb7eb8c9Sopenharmony_ci    "private=public",
174cb7eb8c9Sopenharmony_ci    "LOG_DOMAIN=0xD004308",
175cb7eb8c9Sopenharmony_ci    "LOG_TAG=\"CLOUD_DAEMON_API\"",
176cb7eb8c9Sopenharmony_ci  ]
177cb7eb8c9Sopenharmony_ci
178cb7eb8c9Sopenharmony_ci  use_exceptions = true
179cb7eb8c9Sopenharmony_ci}
180cb7eb8c9Sopenharmony_ci
181cb7eb8c9Sopenharmony_ciohos_unittest("file_operations_base_test") {
182cb7eb8c9Sopenharmony_ci  module_out_path = "filemanagement/dfs_service"
183cb7eb8c9Sopenharmony_ci
184cb7eb8c9Sopenharmony_ci  include_dirs = [
185cb7eb8c9Sopenharmony_ci    "${distributedfile_path}/utils/log/include",
186cb7eb8c9Sopenharmony_ci    "${services_path}/cloudfiledaemon/include/cloud_disk/",
187cb7eb8c9Sopenharmony_ci    "${distributedfile_path}/test/unittests/cloud_disk/mock/",
188cb7eb8c9Sopenharmony_ci    "//third_party/libfuse/include",
189cb7eb8c9Sopenharmony_ci    "//third_party/libfuse/lib",
190cb7eb8c9Sopenharmony_ci    "${distributedfile_path}/services/clouddisk_database/include/",
191cb7eb8c9Sopenharmony_ci  ]
192cb7eb8c9Sopenharmony_ci
193cb7eb8c9Sopenharmony_ci  sources = [
194cb7eb8c9Sopenharmony_ci    "${services_path}/cloudfiledaemon/src/cloud_disk/file_operations_base.cpp",
195cb7eb8c9Sopenharmony_ci    "${services_path}/cloudfiledaemon/src/cloud_disk/file_operations_helper.cpp",
196cb7eb8c9Sopenharmony_ci    "file_operations_base_test.cpp",
197cb7eb8c9Sopenharmony_ci    "mock/clouddisk_rdbstore_mock.cpp",
198cb7eb8c9Sopenharmony_ci    "mock/libfuse_mock.cpp",
199cb7eb8c9Sopenharmony_ci    "mock/system_function_mock.cpp",
200cb7eb8c9Sopenharmony_ci  ]
201cb7eb8c9Sopenharmony_ci
202cb7eb8c9Sopenharmony_ci  deps = [
203cb7eb8c9Sopenharmony_ci    "${innerkits_native_path}/cloud_file_kit_inner:cloudfile_kit",
204cb7eb8c9Sopenharmony_ci    "${utils_path}:libdistributedfiledentry",
205cb7eb8c9Sopenharmony_ci    "${utils_path}:libdistributedfileutils",
206cb7eb8c9Sopenharmony_ci    "${utils_path}:libdistributedfileutils_lite",
207cb7eb8c9Sopenharmony_ci    "//third_party/googletest:gmock_main",
208cb7eb8c9Sopenharmony_ci    "//third_party/googletest:gtest_main",
209cb7eb8c9Sopenharmony_ci  ]
210cb7eb8c9Sopenharmony_ci
211cb7eb8c9Sopenharmony_ci  external_deps = [
212cb7eb8c9Sopenharmony_ci    "ability_base:want",
213cb7eb8c9Sopenharmony_ci    "common_event_service:cesfwk_innerkits",
214cb7eb8c9Sopenharmony_ci    "hilog:libhilog",
215cb7eb8c9Sopenharmony_ci    "libfuse:libfuse",
216cb7eb8c9Sopenharmony_ci    "relational_store:native_rdb",
217cb7eb8c9Sopenharmony_ci  ]
218cb7eb8c9Sopenharmony_ci
219cb7eb8c9Sopenharmony_ci  defines = [
220cb7eb8c9Sopenharmony_ci    "private=public",
221cb7eb8c9Sopenharmony_ci    "LOG_DOMAIN=0xD004308",
222cb7eb8c9Sopenharmony_ci    "LOG_TAG=\"CLOUD_DAEMON_API\"",
223cb7eb8c9Sopenharmony_ci  ]
224cb7eb8c9Sopenharmony_ci
225cb7eb8c9Sopenharmony_ci  use_exceptions = true
226cb7eb8c9Sopenharmony_ci}
227cb7eb8c9Sopenharmony_ci
228cb7eb8c9Sopenharmony_ciohos_unittest("fuse_operations_test") {
229cb7eb8c9Sopenharmony_ci  module_out_path = "filemanagement/dfs_service"
230cb7eb8c9Sopenharmony_ci
231cb7eb8c9Sopenharmony_ci  include_dirs = [
232cb7eb8c9Sopenharmony_ci    "${distributedfile_path}/utils/log/include",
233cb7eb8c9Sopenharmony_ci    "${services_path}/cloudfiledaemon/include/cloud_disk/",
234cb7eb8c9Sopenharmony_ci    "${distributedfile_path}/test/unittests/cloudsync_sa/mock/",
235cb7eb8c9Sopenharmony_ci    "${distributedfile_path}/test/unittests/cloud_disk/mock/",
236cb7eb8c9Sopenharmony_ci  ]
237cb7eb8c9Sopenharmony_ci
238cb7eb8c9Sopenharmony_ci  sources = [
239cb7eb8c9Sopenharmony_ci    "${distributedfile_path}/test/unittests/cloudsync_sa/mock/parameters.cpp",
240cb7eb8c9Sopenharmony_ci    "${services_path}/cloudfiledaemon/src/cloud_disk/account_status.cpp",
241cb7eb8c9Sopenharmony_ci    "${services_path}/cloudfiledaemon/src/cloud_disk/database_manager.cpp",
242cb7eb8c9Sopenharmony_ci    "${services_path}/cloudfiledaemon/src/cloud_disk/file_operations_base.cpp",
243cb7eb8c9Sopenharmony_ci    "${services_path}/cloudfiledaemon/src/cloud_disk/file_operations_helper.cpp",
244cb7eb8c9Sopenharmony_ci    "${services_path}/cloudfiledaemon/src/cloud_disk/fuse_operations.cpp",
245cb7eb8c9Sopenharmony_ci    "fuse_operations_test.cpp",
246cb7eb8c9Sopenharmony_ci    "mock/clouddisk_rdbstore_mock.cpp",
247cb7eb8c9Sopenharmony_ci    "mock/file_operations_cloud_mock.cpp",
248cb7eb8c9Sopenharmony_ci    "mock/file_operations_local_mock.cpp",
249cb7eb8c9Sopenharmony_ci    "mock/libfuse_mock.cpp",
250cb7eb8c9Sopenharmony_ci    "mock/system_function_mock.cpp",
251cb7eb8c9Sopenharmony_ci  ]
252cb7eb8c9Sopenharmony_ci
253cb7eb8c9Sopenharmony_ci  deps = [
254cb7eb8c9Sopenharmony_ci    "${clouddisk_database_path}:clouddisk_database",
255cb7eb8c9Sopenharmony_ci    "${innerkits_native_path}/cloud_file_kit_inner:cloudfile_kit",
256cb7eb8c9Sopenharmony_ci    "${utils_path}:libdistributedfileutils",
257cb7eb8c9Sopenharmony_ci    "${utils_path}:libdistributedfileutils_lite",
258cb7eb8c9Sopenharmony_ci    "//third_party/googletest:gmock_main",
259cb7eb8c9Sopenharmony_ci    "//third_party/googletest:gtest_main",
260cb7eb8c9Sopenharmony_ci  ]
261cb7eb8c9Sopenharmony_ci
262cb7eb8c9Sopenharmony_ci  cflags = [ "--coverage" ]
263cb7eb8c9Sopenharmony_ci
264cb7eb8c9Sopenharmony_ci  ldflags = [ "--coverage" ]
265cb7eb8c9Sopenharmony_ci
266cb7eb8c9Sopenharmony_ci  cflags_cc = [ "--coverage" ]
267cb7eb8c9Sopenharmony_ci
268cb7eb8c9Sopenharmony_ci  external_deps = [
269cb7eb8c9Sopenharmony_ci    "ability_runtime:dataobs_manager",
270cb7eb8c9Sopenharmony_ci    "c_utils:utils",
271cb7eb8c9Sopenharmony_ci    "common_event_service:cesfwk_innerkits",
272cb7eb8c9Sopenharmony_ci    "ffrt:libffrt",
273cb7eb8c9Sopenharmony_ci    "hilog:libhilog",
274cb7eb8c9Sopenharmony_ci    "hitrace:hitrace_meter",
275cb7eb8c9Sopenharmony_ci    "libfuse:libfuse",
276cb7eb8c9Sopenharmony_ci    "relational_store:native_rdb",
277cb7eb8c9Sopenharmony_ci  ]
278cb7eb8c9Sopenharmony_ci
279cb7eb8c9Sopenharmony_ci  defines = [
280cb7eb8c9Sopenharmony_ci    "private=public",
281cb7eb8c9Sopenharmony_ci    "LOG_DOMAIN=0xD004308",
282cb7eb8c9Sopenharmony_ci    "LOG_TAG=\"CLOUD_DAEMON_API\"",
283cb7eb8c9Sopenharmony_ci  ]
284cb7eb8c9Sopenharmony_ci
285cb7eb8c9Sopenharmony_ci  use_exceptions = true
286cb7eb8c9Sopenharmony_ci}
287cb7eb8c9Sopenharmony_ci
288cb7eb8c9Sopenharmony_ciohos_unittest("file_operations_local_test") {
289cb7eb8c9Sopenharmony_ci  module_out_path = "filemanagement/dfs_service"
290cb7eb8c9Sopenharmony_ci
291cb7eb8c9Sopenharmony_ci  include_dirs = [
292cb7eb8c9Sopenharmony_ci    "${distributedfile_path}/utils/log/include",
293cb7eb8c9Sopenharmony_ci    "${services_path}/cloudfiledaemon/include/cloud_disk/",
294cb7eb8c9Sopenharmony_ci    "${distributedfile_path}/test/unittests/cloudsync_sa/mock/",
295cb7eb8c9Sopenharmony_ci    "${distributedfile_path}/test/unittests/cloud_disk/mock/",
296cb7eb8c9Sopenharmony_ci  ]
297cb7eb8c9Sopenharmony_ci
298cb7eb8c9Sopenharmony_ci  sources = [
299cb7eb8c9Sopenharmony_ci    "${distributedfile_path}/test/unittests/cloud_disk/mock/file_operations_helper_mock.cpp",
300cb7eb8c9Sopenharmony_ci    "${distributedfile_path}/test/unittests/cloudsync_sa/mock/parameters.cpp",
301cb7eb8c9Sopenharmony_ci    "${services_path}/cloudfiledaemon/src/cloud_disk/account_status.cpp",
302cb7eb8c9Sopenharmony_ci    "${services_path}/cloudfiledaemon/src/cloud_disk/database_manager.cpp",
303cb7eb8c9Sopenharmony_ci    "${services_path}/cloudfiledaemon/src/cloud_disk/file_operations_base.cpp",
304cb7eb8c9Sopenharmony_ci    "${services_path}/cloudfiledaemon/src/cloud_disk/file_operations_cloud.cpp",
305cb7eb8c9Sopenharmony_ci    "${services_path}/cloudfiledaemon/src/cloud_disk/file_operations_local.cpp",
306cb7eb8c9Sopenharmony_ci    "${services_path}/cloudfiledaemon/src/cloud_disk/fuse_operations.cpp",
307cb7eb8c9Sopenharmony_ci    "file_operations_local_test.cpp",
308cb7eb8c9Sopenharmony_ci    "mock/clouddisk_rdbstore_mock.cpp",
309cb7eb8c9Sopenharmony_ci    "mock/libfuse_mock.cpp",
310cb7eb8c9Sopenharmony_ci    "mock/system_function_mock.cpp",
311cb7eb8c9Sopenharmony_ci  ]
312cb7eb8c9Sopenharmony_ci
313cb7eb8c9Sopenharmony_ci  deps = [
314cb7eb8c9Sopenharmony_ci    "${clouddisk_database_path}:clouddisk_database",
315cb7eb8c9Sopenharmony_ci    "${innerkits_native_path}/cloud_file_kit_inner:cloudfile_kit",
316cb7eb8c9Sopenharmony_ci    "${utils_path}:libdistributedfileutils",
317cb7eb8c9Sopenharmony_ci    "${utils_path}:libdistributedfileutils_lite",
318cb7eb8c9Sopenharmony_ci    "//third_party/googletest:gmock_main",
319cb7eb8c9Sopenharmony_ci    "//third_party/googletest:gtest_main",
320cb7eb8c9Sopenharmony_ci  ]
321cb7eb8c9Sopenharmony_ci
322cb7eb8c9Sopenharmony_ci  cflags = [ "--coverage" ]
323cb7eb8c9Sopenharmony_ci
324cb7eb8c9Sopenharmony_ci  ldflags = [ "--coverage" ]
325cb7eb8c9Sopenharmony_ci
326cb7eb8c9Sopenharmony_ci  cflags_cc = [ "--coverage" ]
327cb7eb8c9Sopenharmony_ci
328cb7eb8c9Sopenharmony_ci  external_deps = [
329cb7eb8c9Sopenharmony_ci    "ability_runtime:dataobs_manager",
330cb7eb8c9Sopenharmony_ci    "c_utils:utils",
331cb7eb8c9Sopenharmony_ci    "common_event_service:cesfwk_innerkits",
332cb7eb8c9Sopenharmony_ci    "ffrt:libffrt",
333cb7eb8c9Sopenharmony_ci    "hilog:libhilog",
334cb7eb8c9Sopenharmony_ci    "hitrace:hitrace_meter",
335cb7eb8c9Sopenharmony_ci    "libfuse:libfuse",
336cb7eb8c9Sopenharmony_ci    "relational_store:native_rdb",
337cb7eb8c9Sopenharmony_ci  ]
338cb7eb8c9Sopenharmony_ci
339cb7eb8c9Sopenharmony_ci  defines = [
340cb7eb8c9Sopenharmony_ci    "private=public",
341cb7eb8c9Sopenharmony_ci    "LOG_DOMAIN=0xD004308",
342cb7eb8c9Sopenharmony_ci    "LOG_TAG=\"CLOUD_DAEMON_API\"",
343cb7eb8c9Sopenharmony_ci  ]
344cb7eb8c9Sopenharmony_ci
345cb7eb8c9Sopenharmony_ci  use_exceptions = true
346cb7eb8c9Sopenharmony_ci}
347cb7eb8c9Sopenharmony_ci
348cb7eb8c9Sopenharmony_ciohos_unittest("file_operations_helper_test") {
349cb7eb8c9Sopenharmony_ci  module_out_path = "filemanagement/dfs_service"
350cb7eb8c9Sopenharmony_ci
351cb7eb8c9Sopenharmony_ci  include_dirs = [
352cb7eb8c9Sopenharmony_ci    "${distributedfile_path}/utils/log/include",
353cb7eb8c9Sopenharmony_ci    "${services_path}/cloudfiledaemon/include/cloud_disk/",
354cb7eb8c9Sopenharmony_ci    "${distributedfile_path}/test/unittests/cloudsync_sa/mock/",
355cb7eb8c9Sopenharmony_ci    "${distributedfile_path}/test/unittests/cloud_disk/mock/",
356cb7eb8c9Sopenharmony_ci  ]
357cb7eb8c9Sopenharmony_ci
358cb7eb8c9Sopenharmony_ci  sources = [
359cb7eb8c9Sopenharmony_ci    "${distributedfile_path}/test/unittests/cloudsync_sa/mock/parameters.cpp",
360cb7eb8c9Sopenharmony_ci    "${services_path}/cloudfiledaemon/src/cloud_disk/account_status.cpp",
361cb7eb8c9Sopenharmony_ci    "${services_path}/cloudfiledaemon/src/cloud_disk/database_manager.cpp",
362cb7eb8c9Sopenharmony_ci    "${services_path}/cloudfiledaemon/src/cloud_disk/file_operations_base.cpp",
363cb7eb8c9Sopenharmony_ci    "${services_path}/cloudfiledaemon/src/cloud_disk/file_operations_cloud.cpp",
364cb7eb8c9Sopenharmony_ci    "${services_path}/cloudfiledaemon/src/cloud_disk/file_operations_helper.cpp",
365cb7eb8c9Sopenharmony_ci    "${services_path}/cloudfiledaemon/src/cloud_disk/file_operations_local.cpp",
366cb7eb8c9Sopenharmony_ci    "file_operations_helper_test.cpp",
367cb7eb8c9Sopenharmony_ci    "mock/clouddisk_rdbstore_mock.cpp",
368cb7eb8c9Sopenharmony_ci    "mock/libfuse_mock.cpp",
369cb7eb8c9Sopenharmony_ci    "mock/system_function_mock.cpp",
370cb7eb8c9Sopenharmony_ci  ]
371cb7eb8c9Sopenharmony_ci
372cb7eb8c9Sopenharmony_ci  deps = [
373cb7eb8c9Sopenharmony_ci    "${clouddisk_database_path}:clouddisk_database",
374cb7eb8c9Sopenharmony_ci    "${innerkits_native_path}/cloud_file_kit_inner:cloudfile_kit",
375cb7eb8c9Sopenharmony_ci    "${utils_path}:libdistributedfileutils",
376cb7eb8c9Sopenharmony_ci    "${utils_path}:libdistributedfileutils_lite",
377cb7eb8c9Sopenharmony_ci    "//third_party/googletest:gmock_main",
378cb7eb8c9Sopenharmony_ci    "//third_party/googletest:gtest_main",
379cb7eb8c9Sopenharmony_ci  ]
380cb7eb8c9Sopenharmony_ci
381cb7eb8c9Sopenharmony_ci  cflags = [ "--coverage" ]
382cb7eb8c9Sopenharmony_ci
383cb7eb8c9Sopenharmony_ci  ldflags = [ "--coverage" ]
384cb7eb8c9Sopenharmony_ci
385cb7eb8c9Sopenharmony_ci  cflags_cc = [ "--coverage" ]
386cb7eb8c9Sopenharmony_ci
387cb7eb8c9Sopenharmony_ci  external_deps = [
388cb7eb8c9Sopenharmony_ci    "ability_runtime:dataobs_manager",
389cb7eb8c9Sopenharmony_ci    "c_utils:utils",
390cb7eb8c9Sopenharmony_ci    "common_event_service:cesfwk_innerkits",
391cb7eb8c9Sopenharmony_ci    "ffrt:libffrt",
392cb7eb8c9Sopenharmony_ci    "hilog:libhilog",
393cb7eb8c9Sopenharmony_ci    "hitrace:hitrace_meter",
394cb7eb8c9Sopenharmony_ci    "libfuse:libfuse",
395cb7eb8c9Sopenharmony_ci    "relational_store:native_rdb",
396cb7eb8c9Sopenharmony_ci  ]
397cb7eb8c9Sopenharmony_ci
398cb7eb8c9Sopenharmony_ci  defines = [
399cb7eb8c9Sopenharmony_ci    "private=public",
400cb7eb8c9Sopenharmony_ci    "LOG_DOMAIN=0xD004308",
401cb7eb8c9Sopenharmony_ci    "LOG_TAG=\"CLOUD_DAEMON_API\"",
402cb7eb8c9Sopenharmony_ci  ]
403cb7eb8c9Sopenharmony_ci
404cb7eb8c9Sopenharmony_ci  use_exceptions = true
405cb7eb8c9Sopenharmony_ci}
406cb7eb8c9Sopenharmony_ci
407cb7eb8c9Sopenharmony_cigroup("cloud_disk_test") {
408cb7eb8c9Sopenharmony_ci  testonly = true
409cb7eb8c9Sopenharmony_ci
410cb7eb8c9Sopenharmony_ci  deps = [
411cb7eb8c9Sopenharmony_ci    ":account_status_listener_test",
412cb7eb8c9Sopenharmony_ci    ":file_operations_base_test",
413cb7eb8c9Sopenharmony_ci    ":file_operations_cloud_test",
414cb7eb8c9Sopenharmony_ci    ":file_operations_helper_test",
415cb7eb8c9Sopenharmony_ci    ":file_operations_local_test",
416cb7eb8c9Sopenharmony_ci    ":fuse_operations_test",
417cb7eb8c9Sopenharmony_ci  ]
418cb7eb8c9Sopenharmony_ci}
419