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 14import("//build/ohos.gni") 15import("../../../../tools/build/suite.gni") 16dsoftbus_root_path = "../../../../../../foundation/communication/dsoftbus" 17wifi_root_path = "../../../../../../foundation/communication/wifi/wifi" 18 19ohos_executable("dsoftbusTest") { 20 sanitize = { 21 cfi = true 22 cfi_cross_dso = true 23 debug = true 24 } 25 26 sources = [ 27 "../common/net_trans_common.c", 28 "../common/wifi_utils.cpp", 29 "./dsoftbusTest.cpp", 30 ] 31 32 include_dirs = [ 33 "../common", 34 "$dsoftbus_root_path/core/common/include", 35 "$dsoftbus_root_path/adapter/common/include", 36 "$dsoftbus_root_path/interfaces/kits/common", 37 "$dsoftbus_root_path/interfaces/kits/bus_center", 38 "$dsoftbus_root_path/interfaces/kits/discovery", 39 "$dsoftbus_root_path/interfaces/kits/transport", 40 "$wifi_root_path/frameworks/native/include", 41 "$wifi_root_path/frameworks/native/interfaces", 42 "$wifi_root_path/services/wifi_standard/wifi_framework/wifi_toolkit/net_helper", 43 "$wifi_root_path/services/wifi_standard/wifi_framework/wifi_toolkit/log", 44 ] 45 46 external_deps = [ 47 "access_token:libaccesstoken_sdk", 48 "access_token:libnativetoken", 49 "access_token:libtoken_setproc", 50 "c_utils:utils", 51 "dsoftbus:softbus_client", 52 "hilog:libhilog", 53 "ipc:ipc_core", 54 "samgr:samgr_proxy", 55 "wifi:wifi_sdk", 56 ] 57 subsystem_name = "xts" 58 part_name = "dcts" 59} 60 61ohos_copy("cpdsoftbusTest") { 62 sources = [ "$root_out_dir/xts/dcts/dsoftbusTest" ] 63 outputs = [ "$root_out_dir/suites/${XTS_SUITENAME}/testcases/dsoftbusTest" ] 64 65 deps = [ ":dsoftbusTest" ] 66 subsystem_name = "xts" 67 part_name = "dcts" 68} 69 70group("Softbustestserver") { 71 testonly = true 72 if (is_standard_system) { 73 deps = [ 74 ":cpdsoftbusTest", 75 ":dsoftbusTest", 76 ] 77 } 78} 79