1# Copyright (c) 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("//base/print/print_fwk/print.gni") 15import("//build/config/features.gni") 16import("//build/ohos.gni") 17import("//build/test.gni") 18 19##############################fuzztest########################################## 20ohos_fuzztest("ScanCallBackFuzzTest") { 21 module_out_path = fuzz_test_output_path 22 23 fuzz_config_file = "${print_path}/test/fuzztest/scancallback_fuzzer" 24 25 include_dirs = [ 26 "${print_path}/frameworks/innerkitsimpl/scan_impl/include", 27 "${print_utils_path}/include", 28 ] 29 30 cflags = [ 31 "-g", 32 "-O0", 33 "-Wno-unused-variable", 34 "-fno-omit-frame-pointer", 35 ] 36 37 deps = [ 38 "${print_path}/frameworks/models/scan_models:scan_models", 39 "${print_path}/frameworks/innerkitsimpl/scan_impl:scan_client", 40 ] 41 42 external_deps = [ 43 "ability_base:base", 44 "ability_base:want", 45 "ability_runtime:ability_manager", 46 "ability_runtime:abilitykit_native", 47 "access_token:libaccesstoken_sdk", 48 "bundle_framework:appexecfwk_base", 49 "bundle_framework:appexecfwk_core", 50 "c_utils:utils", 51 "common_event_service:cesfwk_innerkits", 52 "drivers_interface_usb:libusb_proxy_1.0", 53 "eventhandler:libeventhandler", 54 "hilog:libhilog", 55 "hisysevent:libhisysevent", 56 "init:libbegetutil", 57 "ipc:ipc_core", 58 "libjpeg-turbo:turbojpeg", 59 "napi:ace_napi", 60 "netmanager_base:net_conn_manager_if", 61 "netmanager_ext:mdns_manager_if", 62 "os_account:os_account_innerkits", 63 "relational_store:native_rdb", 64 "safwk:system_ability_fwk", 65 "samgr:samgr_proxy", 66 "usb_manager:usbsrv_client", 67 ] 68 69 if (security_guard_enabled) { 70 external_deps += [ 71 "security_guard:libsg_collect_sdk", 72 "time_service:time_client", 73 ] 74 } 75 76 sources = [ "scancallback_fuzzer.cpp" ] 77} 78 79############################################################################### 80group("fuzztest") { 81 testonly = true 82 deps = [] 83 deps += [ 84 # deps file 85 ":ScanCallBackFuzzTest", 86 ] 87} 88############################################################################### 89