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") 16module_output_path = "dsoftbus/soft_bus/transmission" 17 18ohos_unittest("TransProcessDataTest") { 19 module_out_path = module_output_path 20 sources = [ "trans_process_data_test.cpp" ] 21 22 include_dirs = [ 23 "$dsoftbus_root_path/core/transmission/common/include", 24 "$dsoftbus_root_path/core/transmission/common/src", 25 ] 26 27 deps = [ 28 "$dsoftbus_core_path/common:softbus_utils", 29 "$dsoftbus_core_path/frame:softbus_server", 30 "$dsoftbus_root_path/adapter:softbus_adapter", 31 ] 32 33 external_deps = [ 34 "c_utils:utils", 35 "dsoftbus:softbus_client", 36 "googletest:gmock", 37 "hilog:libhilog", 38 ] 39} 40 41ohos_unittest("TransMintpSocketTest") { 42 module_out_path = module_output_path 43 sources = [ "softbus_mintp_socket_test.cpp" ] 44 45 include_dirs = [ 46 "$dsoftbus_root_path/core/authentication/include", 47 "$dsoftbus_root_path/core/authentication/interface", 48 "$dsoftbus_root_path/interfaces/kits/connect", 49 "$dsoftbus_root_path/core/connection/interface", 50 "$dsoftbus_root_path/core/connection/common/include", 51 "$dsoftbus_root_path/core/connection/manager", 52 "$dsoftbus_root_path/core/transmission/trans_channel/common/include", 53 "$dsoftbus_root_path/core/transmission/trans_channel/proxy/include", 54 "$dsoftbus_root_path/core/connection/common/src", 55 ] 56 57 deps = [ 58 "$dsoftbus_core_path/common:softbus_utils", 59 "$dsoftbus_core_path/frame:softbus_server", 60 "$dsoftbus_root_path/adapter:softbus_adapter", 61 ] 62 63 external_deps = [ 64 "c_utils:utils", 65 "dsoftbus:softbus_client", 66 "googletest:gmock", 67 "hilog:libhilog", 68 ] 69} 70 71ohos_unittest("SoftBusHtpSocketTest") { 72 module_out_path = module_output_path 73 sources = [ 74 "softbus_htp_socket_test.cpp" 75 ] 76 77 include_dirs = [ 78 "$dsoftbus_root_path/core/authentication/include", 79 "$dsoftbus_root_path/core/authentication/interface", 80 "$dsoftbus_root_path/interfaces/kits/connect", 81 "$dsoftbus_root_path/core/connection/interface", 82 "$dsoftbus_root_path/core/connection/common/include", 83 "$dsoftbus_root_path/core/connection/manager", 84 "$dsoftbus_root_path/core/transmission/trans_channel/common/include", 85 "$dsoftbus_root_path/core/transmission/trans_channel/proxy/include", 86 "$dsoftbus_root_path/core/connection/common/src", 87 ] 88 89 deps = [ 90 "$dsoftbus_core_path/common:softbus_utils", 91 "$dsoftbus_core_path/frame:softbus_server", 92 "$dsoftbus_root_path/adapter:softbus_adapter", 93 ] 94 95 external_deps = [ 96 "c_utils:utils", 97 "dsoftbus:softbus_client", 98 "googletest:gmock", 99 "hilog:libhilog", 100 ] 101} 102 103ohos_unittest("SoftbusHtpSocketMockTest") { 104 module_out_path = module_output_path 105 sources = [ 106 "softbus_htp_socket_mock_test.cpp", 107 "mock/src/softbus_htp_socket_mock.cpp", 108 ] 109 110 include_dirs = [ 111 "mock/include", 112 "$dsoftbus_root_path/core/authentication/include", 113 "$dsoftbus_root_path/core/authentication/interface", 114 "$dsoftbus_root_path/interfaces/kits/connect", 115 "$dsoftbus_root_path/core/connection/interface", 116 "$dsoftbus_root_path/core/connection/common/include", 117 "$dsoftbus_root_path/core/connection/manager", 118 "$dsoftbus_root_path/core/transmission/trans_channel/common/include", 119 "$dsoftbus_root_path/core/transmission/trans_channel/proxy/include", 120 "$dsoftbus_root_path/core/connection/common/src", 121 ] 122 123 deps = [ 124 "$dsoftbus_core_path/common:softbus_utils", 125 "$dsoftbus_core_path/frame:softbus_server", 126 "$dsoftbus_root_path/adapter:softbus_adapter", 127 ] 128 129 external_deps = [ 130 "c_utils:utils", 131 "dsoftbus:softbus_client", 132 "googletest:gmock", 133 "hilog:libhilog", 134 ] 135} 136 137group("unittest") { 138 testonly = true 139 140 deps = [ 141 ":TransMintpSocketTest", 142 ":TransProcessDataTest", 143 ":SoftBusHtpSocketTest", 144 ":SoftbusHtpSocketMockTest", 145 "trans_pending_pkt_test:unittest", 146 ] 147} 148