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 "sdk/bus_center:unittest", 52 "sdk/discovery:unittest", 53 "sdk/frame/common:unittest", 54 "sdk/frame/standard:unittest", 55 "sdk/transmission:unittest", 56 ] 57 } 58 } 59 60 group("fuzztest") { 61 testonly = true 62 deps = [ 63 "adapter:fuzztest", 64 "core/adapter:fuzztest", 65 "core/authentication:fuzztest", 66 "core/broadcast:fuzztest", 67 "core/bus_center:fuzztest", 68 "core/common:fuzztest", 69 "core/connection:fuzztest", 70 "core/discovery:fuzztest", 71 "core/frame:fuzztest", 72 "core/transmission:fuzztest", 73 "sdk/bus_center:fuzztest", 74 "sdk/frame:fuzztest", 75 "sdk/transmission:fuzztest", 76 ] 77 } 78 79 group("benchmarktest") { 80 testonly = true 81 deps = [ 82 "sdk/bus_center:benchmarktest", 83 "sdk/discovery:benchmarktest", 84 "sdk/transmission:benchmarktest", 85 ] 86 } 87 88 group("integration_test") { 89 testonly = true 90 deps = [ "sdk/transmission:integration_test" ] 91 } 92} 93