• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (C) 2024-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
17module_output_path = "dfs_service/dfs_service_daemon/distributedfiledaemon"
18
19config("module_private_config") {
20  visibility = [ ":*" ]
21
22  include_dirs = [
23    "${distributedfile_path}/frameworks/native/distributed_file_inner/include",
24    "${distributedfile_path}/test/mock",
25    "${services_path}/distributedfiledaemon/include",
26    "${services_path}/distributedfiledaemon/include/ipc",
27  ]
28}
29
30ohos_unittest("all_connect_manager_test") {
31  branch_protector_ret = "pac_ret"
32  sanitize = {
33    integer_overflow = true
34    cfi = true
35    cfi_cross_dso = true
36    debug = false
37    blocklist = "${distributedfile_path}/cfi_blocklist.txt"
38  }
39
40  module_out_path = module_output_path
41
42  include_dirs = [
43    "${distributedfile_path}/services/distributedfiledaemon/include/network/softbus",
44    "${distributedfile_path}/services/distributedfiledaemon/test/mock",
45  ]
46
47  sources = [
48    "${services_path}/distributedfiledaemon/test/mock/library_func_mock.cpp",
49    "all_connect_manager_test.cpp",
50  ]
51
52  configs = [
53    ":module_private_config",
54    "${utils_path}:compiler_configs",
55  ]
56
57  deps = [
58    "${services_path}/distributedfiledaemon:libdistributedfiledaemon",
59    "${utils_path}:libdistributedfileutils",
60  ]
61
62  external_deps = [
63    "ability_base:zuri",
64    "access_token:libaccesstoken_sdk",
65    "app_file_service:sandbox_helper_native",
66    "c_utils:utils",
67    "dataclassification:data_transit_mgr",
68    "device_manager:devicemanagersdk",
69    "dsoftbus:softbus_client",
70    "googletest:gmock_main",
71    "googletest:gtest_main",
72    "hilog:libhilog",
73    "hisysevent:libhisysevent",
74    "os_account:os_account_innerkits",
75  ]
76
77  defines = [
78    "private=public",
79    "LOG_TAG=\"distributedfile_daemon\"",
80  ]
81}
82
83group("unittest") {
84  testonly = true
85  deps = [ ":all_connect_manager_test" ]
86}
87