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("TransSessionManagerTest") { 20 module_out_path = module_output_path 21 sources = [ "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/core/transmission/session/include", 28 ] 29 30 deps = [ 31 "$dsoftbus_root_path/core/common:softbus_utils", 32 "$dsoftbus_root_path/core/frame:softbus_server", 33 "//third_party/googletest:gtest_main", 34 ] 35 36 if (is_standard_system) { 37 external_deps = [ 38 "c_utils:utils", 39 "hiviewdfx_hilog_native:libhilog", 40 ] 41 } else { 42 external_deps = [ 43 "c_utils:utils", 44 "hilog:libhilog", 45 ] 46 } 47} 48 49ohos_unittest("TransSessionServiceTest") { 50 module_out_path = module_output_path 51 sources = [ "trans_session_service_test.cpp" ] 52 53 include_dirs = [ 54 "$dsoftbus_root_path/core/common/include", 55 "$dsoftbus_root_path/core/frame/common/include", 56 "$dsoftbus_root_path/core/transmission/common/include", 57 "$dsoftbus_root_path/core/transmission/session/include", 58 ] 59 60 deps = [ 61 "$dsoftbus_root_path/core/common:softbus_utils", 62 "$dsoftbus_root_path/core/frame:softbus_server", 63 "//third_party/googletest:gtest_main", 64 ] 65 66 if (is_standard_system) { 67 external_deps = [ 68 "c_utils:utils", 69 "hiviewdfx_hilog_native:libhilog", 70 ] 71 } else { 72 external_deps = [ 73 "c_utils:utils", 74 "hilog:libhilog", 75 ] 76 } 77} 78 79group("unittest") { 80 testonly = true 81 deps = [ 82 ":TransSessionManagerTest", 83 ":TransSessionServiceTest", 84 ] 85} 86