• 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.
13
14import("//build/test.gni")
15import("../../../../../../dsoftbus.gni")
16
17module_output_path = "dsoftbus/soft_bus/transmission"
18dsoftbus_root_path = "../../../../../.."
19
20if (defined(ohos_lite)) {
21  executable("dsoftbus_app_dfile") {
22    sources = [ "dsoftbus_app_dfile.c" ]
23    include_dirs = [
24      "../../../../../../interfaces/kits/common",
25      "../../../../../../interfaces/kits/bus_center",
26      "../../../../../../interfaces/kits/common",
27      "$dsoftbus_root_path/interfaces/kits/transport",
28      "$dsoftbus_root_path//core/common/include",
29      "//third_party/bounds_checking_function/include",
30    ]
31    deps = [
32      "$dsoftbus_root_path/core/common:softbus_utils",
33      "$dsoftbus_root_path/tests/sdk:softbus_client_static",
34      "//third_party/bounds_checking_function:libsec_shared",
35    ]
36  }
37} else {
38  import("//build/ohos.gni")
39
40  ###########################palTest###########################
41  ohos_executable("dsoftbus_app_dfile") {
42    sanitize = {
43      cfi = true
44      cfi_cross_dso = true
45      debug = false
46    }
47    branch_protector_ret = "pac_ret"
48
49    install_enable = true
50    sources = [ "dsoftbus_app_dfile.cpp" ]
51
52    include_dirs = [
53      "../../../../../../interfaces/kits/common",
54      "../../../../../../interfaces/kits/bus_center",
55      "../../../../../../interfaces/kits/common",
56      "$dsoftbus_root_path/interfaces/kits/transport",
57    ]
58
59    deps = [
60      "$dsoftbus_root_path/core/common:softbus_utils",
61      "$dsoftbus_root_path/tests/sdk:softbus_client_static",
62    ]
63
64    if (is_standard_system) {
65      external_deps = [
66        "c_utils:utils",
67        "hilog:libhilog",
68      ]
69      part_name = "dsoftbus"
70    }
71    subsystem_name = "communication"
72  }
73
74  ohos_unittest("TransSdkFileTest") {
75    module_out_path = module_output_path
76    sources = [ "trans_sdk_file_test.cpp" ]
77
78    include_dirs = [
79      "$dsoftbus_root_path/interfaces/kits/transport",
80      "dsoftbus_root_path/sdk/transmission/trans_channel/udp/stream/include",
81      "dsoftbus_root_path/sdk/transmission/trans_channel/udp/stream/src",
82      "$dsoftbus_root_path/sdk/transmission/session/cpp/include",
83      "$dsoftbus_root_path/sdk/transmission/trans_channel/statistics/include",
84      "$dsoftbus_root_path/sdk/transmission/trans_channel/udp/file/include",
85      "$dsoftbus_root_path/sdk/transmission/trans_channel/udp/file/src",
86      "$dsoftbus_root_path/sdk/transmission/session/include",
87      "$dsoftbus_root_path/adapter/common/include",
88      "$dsoftbus_root_path/components/nstackx/nstackx_core/dfile/core",
89      "$dsoftbus_root_path/sdk/transmission/trans_channel/udp/common/include",
90      "$dsoftbus_root_path/core/common/include",
91      "$dsoftbus_root_path/adapter/common/include/OS_adapter_define/linux",
92      "$dsoftbus_root_path/components/nstackx/nstackx_util/interface",
93      "$dsoftbus_root_path/core/transmission/trans_channel/udp_negotiation/include",
94      "$dsoftbus_root_path/sdk/transmission/trans_channel/udp/stream/include",
95      "$dsoftbus_root_path/sdk/transmission/trans_channel/udp/common/src",
96      "$dsoftbus_root_path/sdk/transmission/ipc/include",
97      "$dsoftbus_root_path/components/nstackx/nstackx_core/dfile/interface",
98      "$dsoftbus_root_path/components/nstackx/nstackx_core/dfile/core",
99      "$dsoftbus_root_path/sdk/transmission/trans_channel/tcp_direct/include",
100      "$dsoftbus_root_path/components/nstackx/fillp/include",
101      "$dsoftbus_root_path/adapter/common/security/access_token/include",
102    ]
103
104    deps = [
105      "$dsoftbus_root_path/core/common:softbus_utils",
106      "$dsoftbus_root_path/core/frame:softbus_server",
107      "$dsoftbus_root_path/tests/sdk:softbus_client_static",
108    ]
109
110    if (!defined(global_parts_info) ||
111      defined(global_parts_info.communication_dsoftbus_service_ext)) {
112      deps += [ "$dsoftbus_root_path/components/nstackx_enhanced/nstackx_core/dfile:nstackx_dfile" ]
113    } else {
114      deps += [ "$dsoftbus_root_path/components/nstackx/nstackx_core/dfile:nstackx_dfile.open" ]
115    }
116
117    external_deps = [
118      "bounds_checking_function:libsec_static",
119      "c_utils:utils",
120      "hilog:libhilog",
121    ]
122  }
123
124  group("unittest") {
125    testonly = true
126    deps = [ ":TransSdkFileTest" ]
127  }
128}
129