• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2023 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/transmission"
18dsoftbus_root_path = "../../../../.."
19softbus_adapter_config = "${dsoftbus_root_path}/adapter/default_config"
20
21ohos_unittest("TransSdkTcpDirectTest") {
22  module_out_path = module_output_path
23  sources = [ "trans_sdk_tcp_direct_test.cpp" ]
24
25  include_dirs = [
26    "$dsoftbus_root_path/core/common/softbus_property/include",
27    "$softbus_adapter_config/spec_config",
28    "$dsoftbus_root_path/adapter/common/include/OS_adapter_define/linux",
29    "$dsoftbus_root_path/core/common/include",
30    "$dsoftbus_root_path/core/connection/interface",
31    "$dsoftbus_root_path/sdk/transmission/session/include",
32    "$dsoftbus_root_path/interfaces/inner_kits/transport",
33    "$dsoftbus_root_path/interfaces/kits/transport",
34    "$dsoftbus_root_path/tests/sdk/common/include",
35    "$dsoftbus_root_path/sdk/transmission/trans_channel/tcp_direct/src",
36    "$dsoftbus_root_path/adapter/common/include",
37    "$dsoftbus_root_path/sdk/transmission/trans_channel/tcp_direct/include",
38    "$dsoftbus_root_path/sdk/transmission/session/include",
39    "$dsoftbus_root_path/core/frame/common/include",
40    "$dsoftbus_root_path/sdk/transmission/trans_channel/udp/common/include",
41    "$dsoftbus_root_path/core/transmission/trans_channel/udp_negotiation/include",
42    "$dsoftbus_root_path/sdk/transmission/trans_channel/udp/file/include",
43    "$dsoftbus_root_path/sdk/transmission/ipc/include",
44  ]
45
46  deps = [
47    "$dsoftbus_root_path/adapter:softbus_adapter",
48    "$dsoftbus_root_path/core/common:softbus_utils",
49    "$dsoftbus_root_path/sdk:softbus_client",
50    "$dsoftbus_root_path/tests/sdk/common:softbus_access_token_test",
51    "//third_party/bounds_checking_function:libsec_static",
52    "//third_party/googletest:gtest_main",
53  ]
54
55  if (is_standard_system) {
56    external_deps = [
57      "c_utils:utils",
58      "hilog:libhilog",
59    ]
60  } else {
61    external_deps = [
62      "c_utils:utils",
63      "hilog:libhilog",
64    ]
65  }
66}
67
68ohos_unittest("TransSessionTest") {
69  module_out_path = module_output_path
70  sources = [ "trans_session_test.cpp" ]
71
72  include_dirs = [
73    "$dsoftbus_root_path/core/common/include",
74    "$dsoftbus_root_path/core/common/include",
75    "$dsoftbus_root_path/core/connection/interface",
76    "$dsoftbus_root_path/sdk/transmission/session/include",
77    "$dsoftbus_root_path/interfaces/inner_kits/transport",
78    "$dsoftbus_root_path/interfaces/kits/transport",
79    "$dsoftbus_root_path/tests/sdk/common/include",
80    "$dsoftbus_root_path/sdk/transmission/trans_channel/tcp_direct/src",
81    "$dsoftbus_root_path/adapter/common/include",
82    "$dsoftbus_root_path/sdk/transmission/trans_channel/tcp_direct/include",
83    "$dsoftbus_root_path/sdk/transmission/session/include",
84    "$dsoftbus_root_path/core/frame/common/include",
85    "$dsoftbus_root_path/sdk/transmission/trans_channel/udp/common/include",
86    "$dsoftbus_root_path/core/transmission/trans_channel/udp_negotiation/include",
87    "$dsoftbus_root_path/sdk/transmission/trans_channel/udp/file/include",
88    "$dsoftbus_root_path/sdk/transmission/ipc/include",
89  ]
90
91  deps = [
92    "$dsoftbus_root_path/core/common:softbus_utils",
93    "$dsoftbus_root_path/sdk:softbus_client",
94    "$dsoftbus_root_path/sdk:softbus_client",
95    "$dsoftbus_root_path/tests/sdk/common:softbus_access_token_test",
96  ]
97
98  if (is_standard_system) {
99    external_deps = [
100      "c_utils:utils",
101      "hilog:libhilog",
102    ]
103  } else {
104    external_deps = [
105      "c_utils:utils",
106      "hilog:libhilog",
107    ]
108  }
109}
110
111ohos_unittest("TransTcpDirectTest") {
112  module_out_path = module_output_path
113  sources = [ "trans_tcp_direct_test.cpp" ]
114
115  include_dirs = [
116    "$dsoftbus_root_path/core/common/include",
117    "$dsoftbus_root_path/core/common/include",
118    "$dsoftbus_root_path/core/connection/interface",
119    "$dsoftbus_root_path/sdk/transmission/session/include",
120    "$dsoftbus_root_path/interfaces/inner_kits/transport",
121    "$dsoftbus_root_path/interfaces/kits/transport",
122    "$dsoftbus_root_path/tests/sdk/common/include",
123    "$dsoftbus_root_path/sdk/transmission/trans_channel/tcp_direct/src",
124    "$dsoftbus_root_path/adapter/common/include",
125    "$dsoftbus_root_path/sdk/transmission/trans_channel/tcp_direct/include",
126    "$dsoftbus_root_path/sdk/transmission/session/include",
127    "$dsoftbus_root_path/core/frame/common/include",
128    "$dsoftbus_root_path/sdk/transmission/trans_channel/udp/common/include",
129    "$dsoftbus_root_path/core/transmission/trans_channel/udp_negotiation/include",
130    "$dsoftbus_root_path/sdk/transmission/trans_channel/udp/file/include",
131    "$dsoftbus_root_path/sdk/transmission/ipc/include",
132  ]
133
134  deps = [
135    "$dsoftbus_root_path/core/common:softbus_utils",
136    "$dsoftbus_root_path/sdk:softbus_client",
137    "$dsoftbus_root_path/sdk:softbus_client",
138    "$dsoftbus_root_path/tests/sdk/common:softbus_access_token_test",
139  ]
140
141  if (is_standard_system) {
142    external_deps = [
143      "c_utils:utils",
144      "hilog:libhilog",
145    ]
146  } else {
147    external_deps = [
148      "c_utils:utils",
149      "hilog:libhilog",
150    ]
151  }
152}
153
154group("unittest") {
155  testonly = true
156  deps = [
157    ":TransSdkTcpDirectTest",
158    ":TransSessionTest",
159    ":TransTcpDirectTest",
160  ]
161}
162