1# Copyright (c) 2021-2024 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 14if (defined(ohos_lite)) { 15 import("//build/lite/config/component/lite_component.gni") 16 17 lite_component("softbus_test") { 18 if (ohos_kernel_type == "liteos_m") { 19 features = [] 20 } else { 21 features = [] 22 if (ohos_build_type == "debug") { 23 features += [ 24 "adapter/unittest:AdapterTest", 25 "sdk/bus_center/unittest:BusCenterSdkRefreshSmall", 26 "sdk/discovery/unittest:DiscSdkTest", 27 "sdk/transmission/trans_channel:TransSdkStreamTest", 28 ] 29 } 30 } 31 } 32} else { 33 import("//build/test.gni") 34 import("../dsoftbus.gni") 35 36 group("unittest") { 37 testonly = true 38 deps = [] 39 if (!use_libfuzzer) { 40 deps += [ 41 "adapter:unittest", 42 "core/adapter:unittest", 43 "core/authentication:unittest", 44 "core/broadcast:unittest", 45 "core/bus_center:unittest", 46 "core/common:unittest", 47 "core/connection:unittest", 48 "core/discovery:unittest", 49 "core/frame:unittest", 50 "core/transmission:unittest", 51 "dfx:unittest", 52 "sdk/bus_center:unittest", 53 "sdk/discovery:unittest", 54 "sdk/frame/common:unittest", 55 "sdk/frame/standard:unittest", 56 "sdk/transmission:unittest", 57 ] 58 } 59 } 60 61 group("fuzztest") { 62 testonly = true 63 deps = [ 64 "adapter:fuzztest", 65 "core/adapter:fuzztest", 66 "core/authentication:fuzztest", 67 "core/broadcast:fuzztest", 68 "core/bus_center:fuzztest", 69 "core/common:fuzztest", 70 "core/connection:fuzztest", 71 "core/discovery:fuzztest", 72 "core/frame:fuzztest", 73 "core/transmission:fuzztest", 74 "dfx:fuzztest", 75 "sdk/bus_center:fuzztest", 76 "sdk/frame:fuzztest", 77 "sdk/transmission:fuzztest", 78 ] 79 } 80 81 group("benchmarktest") { 82 testonly = true 83 deps = [ 84 "sdk/bus_center:benchmarktest", 85 "sdk/discovery:benchmarktest", 86 "sdk/transmission:benchmarktest", 87 ] 88 } 89 90 group("integration_test") { 91 testonly = true 92 deps = [ "sdk/transmission:integration_test" ] 93 } 94} 95