1# Copyright (c) 2022-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/test.gni") 15import("../../../../dsoftbus.gni") 16 17module_output_path = "dsoftbus/soft_bus/transmission" 18 19ohos_unittest("TransSessionManagerTest") { 20 module_out_path = module_output_path 21 sources = [ "trans_session_manager_test.cpp" ] 22 23 include_dirs = [ 24 "$dsoftbus_core_path/authentication/interface", 25 "$dsoftbus_core_path/bus_center/interface", 26 "$dsoftbus_core_path/bus_center/lnn/lane_hub/lane_manager/include", 27 "$dsoftbus_core_path/bus_center/lnn/net_ledger/common/include", 28 "$dsoftbus_core_path/common/include", 29 "$dsoftbus_core_path/common/security/permission/include", 30 "$dsoftbus_core_path/connection/interface", 31 "$dsoftbus_core_path/discovery/interface", 32 "$dsoftbus_core_path/discovery/manager/include", 33 "$dsoftbus_core_path/transmission/common/include", 34 "$dsoftbus_core_path/transmission/ipc/include", 35 "$dsoftbus_core_path/transmission/session/cpp/include", 36 "$dsoftbus_core_path/transmission/session/include", 37 "$dsoftbus_core_path/transmission/session/src", 38 "$dsoftbus_core_path/transmission/trans_channel/manager/include", 39 "$dsoftbus_dfx_path/interface/include/form", 40 ] 41 42 deps = [ 43 "$dsoftbus_core_path/common:softbus_utils", 44 "$dsoftbus_core_path/frame:softbus_server", 45 "$dsoftbus_root_path/adapter:softbus_adapter", 46 ] 47 48 external_deps = [ 49 "c_utils:utils", 50 "dsoftbus:softbus_client", 51 "hilog:libhilog", 52 ] 53} 54 55ohos_unittest("TransSessionServiceTest") { 56 module_out_path = module_output_path 57 sources = [ "trans_session_service_test.cpp" ] 58 59 include_dirs = [ 60 "$dsoftbus_core_path/authentication/interface", 61 "$dsoftbus_core_path/bus_center/interface", 62 "$dsoftbus_core_path/bus_center/lnn/net_ledger/common/include", 63 "$dsoftbus_core_path/common/include", 64 "$dsoftbus_core_path/connection/interface", 65 "$dsoftbus_core_path/discovery/interface", 66 "$dsoftbus_core_path/discovery/manager/include", 67 "$dsoftbus_core_path/transmission/common/include", 68 "$dsoftbus_core_path/transmission/session/include", 69 "$dsoftbus_dfx_path/interface/include/form", 70 ] 71 72 deps = [ 73 "$dsoftbus_core_path/common:softbus_utils", 74 "$dsoftbus_core_path/frame:softbus_server", 75 "$dsoftbus_root_path/adapter:softbus_adapter", 76 ] 77 78 external_deps = [ 79 "c_utils:utils", 80 "dsoftbus:softbus_client", 81 "hilog:libhilog", 82 ] 83} 84 85ohos_unittest("TransScenarioManagerTest") { 86 module_out_path = module_output_path 87 sources = [ "softbus_scenario_manager_test.cpp" ] 88 89 include_dirs = [ 90 "$dsoftbus_core_path/common/include", 91 "$dsoftbus_core_path/transmission/session/include", 92 ] 93 94 deps = [ 95 "$dsoftbus_core_path/common:softbus_utils", 96 "$dsoftbus_core_path/frame:softbus_server", 97 ] 98 99 external_deps = [ 100 "c_utils:utils", 101 "hilog:libhilog", 102 ] 103} 104 105group("unittest") { 106 testonly = true 107 deps = [ 108 ":TransScenarioManagerTest", 109 ":TransSessionManagerTest", 110 ":TransSessionServiceTest", 111 ] 112} 113