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" 18dsoftbus_root_path = "../../../.." 19 20ohos_unittest("TransSessionManagerTest") { 21 module_out_path = module_output_path 22 sources = [ "trans_session_manager_test.cpp" ] 23 24 include_dirs = [ 25 "$dsoftbus_root_path/core/common/include", 26 "$dsoftbus_root_path/core/frame/common/include", 27 "$dsoftbus_root_path/core/transmission/common/include", 28 "$dsoftbus_root_path/core/transmission/session/include", 29 ] 30 31 deps = [ 32 "$dsoftbus_root_path/core/common:softbus_utils", 33 "$dsoftbus_root_path/core/frame:softbus_server", 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("TransSessionServiceTest") { 51 module_out_path = module_output_path 52 sources = [ "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/core/transmission/session/include", 59 ] 60 61 deps = [ 62 "$dsoftbus_root_path/core/common:softbus_utils", 63 "$dsoftbus_root_path/core/frame:softbus_server", 64 "//third_party/googletest:gtest_main", 65 ] 66 67 if (is_standard_system) { 68 external_deps = [ 69 "c_utils:utils", 70 "hilog:libhilog", 71 ] 72 } else { 73 external_deps = [ 74 "c_utils:utils", 75 "hilog:libhilog", 76 ] 77 } 78} 79 80group("unittest") { 81 testonly = true 82 deps = [ 83 ":TransSessionManagerTest", 84 ":TransSessionServiceTest", 85 ] 86} 87