1# Copyright (c) 2025 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/ohos.gni") 15import("//build/test.gni") 16import("../../dsoftbus.gni") 17 18module_output_path = "dsoftbus/transmission" 19 20ohos_unittest("BrProxyTest") { 21 module_out_path = module_output_path 22 include_dirs = [ 23 "$dsoftbus_dfx_path/interface/include/form", 24 "$dsoftbus_root_path/br_proxy", 25 "$dsoftbus_root_path/br_proxy/common/include", 26 "$dsoftbus_root_path/core/authentication/interface", 27 "$dsoftbus_root_path/core/bus_center/interface", 28 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include", 29 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include", 30 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include", 31 "$dsoftbus_root_path/core/bus_center/service/include", 32 "$dsoftbus_root_path/core/common/security/permission/include", 33 "$dsoftbus_root_path/core/connection/proxy", 34 "$dsoftbus_root_path/core/transmission/ipc/include", 35 "$dsoftbus_root_path/core/transmission/trans_channel/common/include", 36 "$dsoftbus_root_path/sdk/frame/common/include", 37 "$dsoftbus_root_path/sdk/transmission/ipc/include", 38 "$dsoftbus_root_path/tests/br_proxy/mock", 39 ] 40 sources = [ 41 "mock/br_proxy_test_mock.cpp", 42 "br_proxy_test.cpp", 43 ] 44 45 deps = [ 46 "$dsoftbus_root_path/adapter:softbus_adapter", 47 "$dsoftbus_root_path/core/common:softbus_utils", 48 "$dsoftbus_root_path/core/frame:softbus_server", 49 "$dsoftbus_root_path/tests/sdk:softbus_client_static", 50 ] 51 52 external_deps = [ 53 "c_utils:utils", 54 "googletest:gmock", 55 "googletest:gtest_main", 56 "hilog:libhilog", 57 "ipc:ipc_single", 58 "access_token:libnativetoken", 59 "access_token:libaccesstoken_sdk", 60 "access_token:libtoken_setproc", 61 "selinux_adapter:librestorecon", 62 ] 63} 64 65ohos_unittest("BrProxyExtTest") { 66 module_out_path = module_output_path 67 include_dirs = [ 68 "$dsoftbus_root_path/br_proxy", 69 "$dsoftbus_root_path/br_proxy/common/include", 70 "$dsoftbus_root_path/core/authentication/interface", 71 "$dsoftbus_root_path/core/bus_center/interface", 72 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include", 73 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include", 74 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include", 75 "$dsoftbus_root_path/core/bus_center/service/include", 76 "$dsoftbus_root_path/core/common/security/permission/include", 77 "$dsoftbus_root_path/core/connection/proxy", 78 "$dsoftbus_root_path/core/transmission/ipc/include", 79 "$dsoftbus_root_path/core/transmission/trans_channel/common/include", 80 "$dsoftbus_root_path/sdk/frame/common/include", 81 "$dsoftbus_root_path/sdk/transmission/ipc/include", 82 "$dsoftbus_root_path/tests/br_proxy/mock", 83 ] 84 sources = [ 85 "mock/br_proxy_ext_test_mock.cpp", 86 "br_proxy_ext_test.cpp", 87 ] 88 89 deps = [ 90 "$dsoftbus_root_path/adapter:softbus_adapter", 91 "$dsoftbus_root_path/core/common:softbus_utils", 92 "$dsoftbus_root_path/core/frame:softbus_server", 93 ] 94 95 external_deps = [ 96 "c_utils:utils", 97 "googletest:gmock", 98 "hilog:libhilog", 99 "ipc:ipc_single", 100 "access_token:libnativetoken", 101 "access_token:libaccesstoken_sdk", 102 "access_token:libtoken_setproc", 103 "selinux_adapter:librestorecon", 104 ] 105} 106 107ohos_unittest("BrProxyServerManagerExtTest") { 108 module_out_path = module_output_path 109 include_dirs = [ 110 "$dsoftbus_root_path/br_proxy", 111 "$dsoftbus_root_path/br_proxy/common/include", 112 "$dsoftbus_root_path/core/authentication/interface", 113 "$dsoftbus_root_path/core/bus_center/interface", 114 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include", 115 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include", 116 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include", 117 "$dsoftbus_root_path/core/bus_center/service/include", 118 "$dsoftbus_root_path/core/common/security/permission/include", 119 "$dsoftbus_root_path/core/connection/proxy", 120 "$dsoftbus_root_path/core/transmission/ipc/include", 121 "$dsoftbus_root_path/core/transmission/trans_channel/common/include", 122 "$dsoftbus_root_path/sdk/frame/common/include", 123 "$dsoftbus_root_path/sdk/transmission/ipc/include", 124 "$dsoftbus_root_path/tests/br_proxy/mock", 125 ] 126 sources = [ 127 "mock/br_proxy_ext_test_mock.cpp", 128 "br_proxy_server_manager_ext_test.cpp", 129 ] 130 131 deps = [ 132 "$dsoftbus_root_path/adapter:softbus_adapter", 133 "$dsoftbus_root_path/core/common:softbus_utils", 134 "$dsoftbus_root_path/core/frame:softbus_server", 135 ] 136 137 external_deps = [ 138 "c_utils:utils", 139 "googletest:gmock", 140 "hilog:libhilog", 141 "ipc:ipc_single", 142 "access_token:libnativetoken", 143 "access_token:libaccesstoken_sdk", 144 "access_token:libtoken_setproc", 145 "selinux_adapter:librestorecon", 146 ] 147} 148 149ohos_unittest("BrProxyServerManagerTest") { 150 module_out_path = module_output_path 151 include_dirs = [ 152 "$dsoftbus_root_path/br_proxy", 153 "$dsoftbus_root_path/br_proxy/common/include", 154 "$dsoftbus_root_path/core/authentication/interface", 155 "$dsoftbus_root_path/core/bus_center/interface", 156 "$dsoftbus_root_path/core/bus_center/lnn/lane_hub/lane_manager/include", 157 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/common/include", 158 "$dsoftbus_root_path/core/bus_center/lnn/net_ledger/distributed_ledger/include", 159 "$dsoftbus_root_path/core/bus_center/service/include", 160 "$dsoftbus_root_path/core/common/security/permission/include", 161 "$dsoftbus_root_path/core/connection/proxy", 162 "$dsoftbus_root_path/core/transmission/ipc/include", 163 "$dsoftbus_root_path/core/transmission/trans_channel/common/include", 164 "$dsoftbus_root_path/sdk/frame/common/include", 165 "$dsoftbus_root_path/sdk/transmission/ipc/include", 166 "$dsoftbus_root_path/tests/br_proxy/mock", 167 ] 168 sources = [ 169 "mock/br_proxy_server_manager_mock.cpp", 170 "br_proxy_server_manager_test.cpp", 171 ] 172 173 deps = [ 174 "$dsoftbus_root_path/adapter:softbus_adapter", 175 "$dsoftbus_root_path/core/common:softbus_utils", 176 "$dsoftbus_root_path/core/frame:softbus_server", 177 ] 178 179 external_deps = [ 180 "c_utils:utils", 181 "googletest:gmock", 182 "hilog:libhilog", 183 "ipc:ipc_single", 184 "access_token:libnativetoken", 185 "access_token:libaccesstoken_sdk", 186 "access_token:libtoken_setproc", 187 "selinux_adapter:librestorecon", 188 ] 189} 190 191group("unittest") { 192 testonly = true 193 deps = [ 194 ":BrProxyTest", 195 ":BrProxyExtTest", 196 ":BrProxyServerManagerExtTest", 197 ":BrProxyServerManagerTest", 198 ] 199} 200 201group("fuzztest") { 202 testonly = true 203 deps = [ "fuzztest:fuzztest" ] 204}