• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2022 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/communication/dsoftbus/dsoftbus.gni")
16
17module_output_path = "dsoftbus/transmission"
18
19ohos_unittest("TransClientSessionManagerTest") {
20  module_out_path = module_output_path
21  sources = [ "client_trans_session_manager_test.cpp" ]
22
23  include_dirs = [
24    "$dsoftbus_root_path/core/common/include",
25    "$dsoftbus_root_path/core/frame/common/include",
26    "$dsoftbus_root_path/core/transmission/common/include",
27    "$dsoftbus_root_path/sdk/transmission/session/include",
28  ]
29
30  deps = [
31    "$dsoftbus_root_path/core/common:softbus_utils",
32    "$dsoftbus_root_path/core/frame:softbus_server",
33    "$dsoftbus_root_path/sdk:softbus_client",
34    "//third_party/googletest:gtest_main",
35  ]
36
37  if (is_standard_system) {
38    external_deps = [
39      "c_utils:utils",
40      "hiviewdfx_hilog_native:libhilog",
41    ]
42  } else {
43    external_deps = [
44      "c_utils:utils",
45      "hilog:libhilog",
46    ]
47  }
48}
49
50ohos_unittest("TransClientSessionServiceTest") {
51  module_out_path = module_output_path
52  sources = [ "client_trans_session_service_test.cpp" ]
53
54  include_dirs = [
55    "$dsoftbus_root_path/core/common/include",
56    "$dsoftbus_root_path/core/frame/common/include",
57    "$dsoftbus_root_path/core/transmission/common/include",
58    "$dsoftbus_root_path/sdk/transmission/session/include",
59    "$dsoftbus_root_path/adapter/default_config/spec_config",
60  ]
61
62  deps = [
63    "$dsoftbus_root_path/core/common:softbus_utils",
64    "$dsoftbus_root_path/core/frame:softbus_server",
65    "$dsoftbus_root_path/sdk:softbus_client",
66    "//third_party/googletest:gtest_main",
67  ]
68
69  if (is_standard_system) {
70    external_deps = [
71      "c_utils:utils",
72      "hiviewdfx_hilog_native:libhilog",
73    ]
74  } else {
75    external_deps = [
76      "c_utils:utils",
77      "hilog:libhilog",
78    ]
79  }
80}
81
82ohos_unittest("TransClientSessionCallbackTest") {
83  module_out_path = module_output_path
84  sources = [ "client_trans_session_callback_test.cpp" ]
85
86  include_dirs = [
87    "$dsoftbus_root_path/core/common/include",
88    "$dsoftbus_root_path/core/frame/common/include",
89    "$dsoftbus_root_path/core/transmission/common/include",
90    "$dsoftbus_root_path/sdk/transmission/session/include",
91    "$dsoftbus_root_path/adapter/default_config/spec_config",
92    "$dsoftbus_root_path/sdk/transmission/session/src",
93    "$dsoftbus_root_path/sdk/transmission/trans_channel/proxy/include",
94    "$dsoftbus_root_path/sdk/transmission/trans_channel/udp/file/include",
95  ]
96
97  deps = [
98    "$dsoftbus_root_path/core/common:softbus_utils",
99    "$dsoftbus_root_path/core/frame:softbus_server",
100    "$dsoftbus_root_path/sdk:softbus_client",
101    "//third_party/googletest:gtest_main",
102  ]
103
104  if (is_standard_system) {
105    external_deps = [
106      "c_utils:utils",
107      "hiviewdfx_hilog_native:libhilog",
108    ]
109  } else {
110    external_deps = [
111      "c_utils:utils",
112      "hilog:libhilog",
113    ]
114  }
115}
116
117ohos_unittest("TransClientMsgServiceTest") {
118  module_out_path = module_output_path
119  sources = [ "client_trans_message_service_test.cpp" ]
120
121  include_dirs = [
122    "$dsoftbus_root_path/core/common/include",
123    "$dsoftbus_root_path/core/frame/common/include",
124    "$dsoftbus_root_path/core/transmission/common/include",
125    "$dsoftbus_root_path/sdk/transmission/session/include",
126    "$dsoftbus_root_path/sdk/transmission/session/src",
127    "$dsoftbus_root_path/interfaces/inner_kits/transport",
128    "$dsoftbus_root_path/sdk/transmission/trans_channel/udp/file/include",
129    "$dsoftbus_root_path/sdk/transmission/trans_channel/manager/include",
130    "$dsoftbus_root_path/sdk/frame/common/include",
131    "$dsoftbus_root_path/tests/sdk/common/include",
132    "$dsoftbus_root_path/sdk/transmission/trans_channel/udp/common/include",
133  ]
134
135  deps = [
136    "$dsoftbus_root_path/core/common:softbus_utils",
137    "$dsoftbus_root_path/core/frame:softbus_server",
138    "$dsoftbus_root_path/sdk:softbus_client",
139    "$dsoftbus_root_path/tests/sdk/common:softbus_access_token_test",
140    "//third_party/googletest:gtest_main",
141  ]
142
143  if (is_standard_system) {
144    external_deps = [
145      "c_utils:utils",
146      "hiviewdfx_hilog_native:libhilog",
147    ]
148  } else {
149    external_deps = [
150      "c_utils:utils",
151      "hilog:libhilog",
152    ]
153  }
154}
155
156ohos_unittest("TransClientSessionTest") {
157  module_out_path = module_output_path
158  sources = [ "client_trans_session_test.cpp" ]
159
160  include_dirs = [
161    "$dsoftbus_root_path/core/common/include",
162    "$dsoftbus_root_path/core/frame/common/include",
163    "$dsoftbus_root_path/core/transmission/common/include",
164    "$dsoftbus_root_path/sdk/transmission/session/include",
165    "$dsoftbus_root_path/sdk/transmission/session/src",
166    "$dsoftbus_root_path/sdk/transmission/trans_channel/proxy/include",
167    "$dsoftbus_root_path/sdk/transmission/trans_channel/udp/file/include",
168    "$dsoftbus_root_path/sdk/transmission/trans_channel/qos/include",
169    "$dsoftbus_root_path/sdk/transmission/trans_channel/manager/include",
170    "$dsoftbus_root_path/sdk/frame/common/include",
171    "$dsoftbus_root_path/sdk/transmission/ipc/include",
172    "$dsoftbus_root_path/tests/sdk/common/include",
173    "$dsoftbus_root_path/interfaces/kits/common",
174  ]
175
176  deps = [
177    "$dsoftbus_root_path/core/common:softbus_utils",
178    "$dsoftbus_root_path/core/frame:softbus_server",
179    "$dsoftbus_root_path/sdk:softbus_client",
180    "$dsoftbus_root_path/tests/sdk/common:softbus_access_token_test",
181    "//third_party/googletest:gtest_main",
182  ]
183
184  if (is_standard_system) {
185    external_deps = [
186      "c_utils:utils",
187      "hiviewdfx_hilog_native:libhilog",
188    ]
189  } else {
190    external_deps = [
191      "c_utils:utils",
192      "hilog:libhilog",
193    ]
194  }
195}
196
197group("unittest") {
198  testonly = true
199  deps = [
200    ":TransClientMsgServiceTest",
201    ":TransClientSessionCallbackTest",
202    ":TransClientSessionManagerTest",
203    ":TransClientSessionServiceTest",
204    ":TransClientSessionTest",
205  ]
206}
207