• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2025 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.
13
14import("//build/test.gni")
15import("//foundation/filemanagement/dfs_service/distributedfile.gni")
16
17ohos_unittest("cloud_sync_core_test") {
18  module_out_path = "dfs_service/dfs_service"
19
20  sources = [
21    "${interfaces_js_path}/ani/ani_helper/src/ani_utils.cpp",
22    "${interfaces_js_path}/ani/ani_helper/src/error_handler.cpp",
23    "${interfaces_js_path}/ani/file_cloud_sync/src/cloud_sync_callback_ani.cpp",
24    "${interfaces_js_path}/ani/file_cloud_sync/src/download_callback_impl_ani.cpp",
25    "${interfaces_js_path}/ani/file_cloud_sync/src/download_callback_middle_ani.cpp",
26    "${interfaces_js_path}/ani/file_cloud_sync/src/download_progress_ani.cpp",
27    "${interfaces_js_path}/ani/file_cloud_sync/src/multi_download_progress_ani.cpp",
28    "${interfaces_js_path}/ani/file_cloud_sync/src/register_callback_manager_ani.cpp",
29    "${interfaces_js_path}/cloudfilesync/cloud_file_cache_core.cpp",
30    "${interfaces_js_path}/cloudfilesync/cloud_file_core.cpp",
31    "${interfaces_js_path}/cloudfilesync/cloud_sync_core.cpp",
32    "${interfaces_js_path}/cloudfilesync/file_sync_core.cpp",
33    "${interfaces_js_path}/cloudfilesync/multi_download_progress_core.cpp",
34    "${interfaces_js_path}/cloudsyncmanager/cloud_sync_manager_core.cpp",
35    "cloud_file_cache_core_test.cpp",
36    "cloud_file_core_test.cpp",
37    "cloud_sync_core_test.cpp",
38    "cloud_sync_manager_core_test.cpp",
39    "file_sync_core_test.cpp",
40  ]
41
42  include_dirs = [
43    "${interfaces_js_path}/ani/ani_helper/include",
44    "${interfaces_js_path}/ani/file_cloud_sync/include",
45    "${interfaces_js_path}/cloudfilesync",
46    "${interfaces_js_path}/cloudsyncmanager",
47  ]
48
49  deps = [
50    "${innerkits_native_path}/cloudsync_kit_inner:cloudsync_kit_inner",
51    "${utils_path}:libdistributedfileutils",
52  ]
53
54  external_deps = [
55    "ability_base:zuri",
56    "ability_runtime:dataobs_manager",
57    "c_utils:utils",
58    "eventhandler:libeventhandler",
59    "file_api:filemgmt_libfs",
60    "googletest:gmock_main",
61    "googletest:gtest_main",
62    "hilog:libhilog",
63    "ipc:ipc_single",
64    "runtime_core:ani",
65    "runtime_core:ani_helpers",
66    "runtime_core:libarkruntime",
67  ]
68
69  defines = [
70    "private=public",
71    "LOG_DOMAIN=0xD004309",
72    "LOG_TAG=\"CLOUD_FILE_SYNC\"",
73  ]
74
75  use_exceptions = true
76}
77
78group("ani_core_test") {
79  testonly = true
80  deps = [ ":cloud_sync_core_test" ]
81}
82