1# Copyright (c) 2021-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("./../../usbmgr.gni") 16 17config("usbsrv_private_config") { 18 include_dirs = [ "${usb_manager_path}/test/native/service_unittest/include" ] 19} 20 21ohos_executable("usb_function_test") { 22 sanitize = { 23 cfi = true 24 cfi_cross_dso = true 25 debug = false 26 } 27 branch_protector_ret = "pac_ret" 28 sources = [ 29 "${usb_manager_path}/test/native/service_unittest/src/usb_common_test.cpp", 30 "usb_function_test.cpp", 31 ] 32 configs = [ 33 "${utils_path}:utils_config", 34 ":usbsrv_private_config", 35 ] 36 deps = [ "${usb_manager_path}/interfaces/innerkits:usbsrv_client" ] 37 external_deps = [ 38 "ability_base:want", 39 "access_token:libaccesstoken_sdk", 40 "access_token:libnativetoken", 41 "access_token:libtoken_setproc", 42 "cJSON:cjson", 43 "c_utils:utils", 44 "common_event_service:cesfwk_innerkits", 45 "drivers_interface_usb:libusb_proxy_1.0", 46 "hilog:libhilog", 47 "ipc:ipc_core", 48 ] 49 install_enable = false 50 subsystem_name = "usb" 51 part_name = "usb_manager" 52} 53