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("../../../../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 "hilog: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 "hilog: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 "hilog: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 "hilog: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 "$dsoftbus_root_path/sdk/bus_center/manager/include", 175 ] 176 177 deps = [ 178 "$dsoftbus_root_path/core/common:softbus_utils", 179 "$dsoftbus_root_path/core/frame:softbus_server", 180 "$dsoftbus_root_path/sdk:softbus_client", 181 "$dsoftbus_root_path/tests/sdk/common:softbus_access_token_test", 182 "//third_party/googletest:gtest_main", 183 ] 184 185 if (is_standard_system) { 186 external_deps = [ 187 "c_utils:utils", 188 "hilog:libhilog", 189 ] 190 } else { 191 external_deps = [ 192 "c_utils:utils", 193 "hilog:libhilog", 194 ] 195 } 196} 197 198group("unittest") { 199 testonly = true 200 deps = [ 201 ":TransClientMsgServiceTest", 202 ":TransClientSessionCallbackTest", 203 ":TransClientSessionManagerTest", 204 ":TransClientSessionServiceTest", 205 ":TransClientSessionTest", 206 ] 207} 208