# Copyright (c) 2021-2024 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import("//build/test.gni") import("../../../dsoftbus.gni") native_source_path = rebase_path("$dsoftbus_root_path") dep_dir = "dsoftbus_enhance/test/core/discovery" has_enhance_test = exec_script("$dsoftbus_root_path/check_sub_module.py", [ "$native_source_path", "$dep_dir", ], "value") group("unittest") { testonly = true deps = [ "manager/unittest:unittest" ] if (support_bluetooth && dsoftbus_feature_disc_ble) { deps += [ "ble/dispatcher:unittest", "ble/softbus_ble:unittest", "ble/softbus_ble_mock:unittest", "ipc:unittest", ] } if (dsoftbus_feature_disc_coap) { deps += [ "coap/common/unittest:unittest", "coap/nstackx_adapter_mock:unittest", "coap/unittest:unittest", ] } if (has_enhance_test) { deps += [ "$dsoftbus_root_path/dsoftbus_enhance/test/core/connection:unittest", "$dsoftbus_root_path/dsoftbus_enhance/test/core/discovery:unittest", "$dsoftbus_root_path/tests/core/broadcast:unittest", ] } } group("fuzztest") { testonly = true deps = [] if (has_enhance_test) { deps += [ "$dsoftbus_root_path/dsoftbus_enhance/test/core/discovery:fuzztest" ] } }