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("PrintCupsAttributeFuzzTest") { 21 module_out_path = fuzz_test_output_path 22 23 fuzz_config_file = "${print_path}/test/fuzztest/printcupsattribute_fuzzer" 24 25 include_dirs = [ 26 "${print_path}/frameworks/innerkitsimpl/print_impl/include", 27 "${print_path}/frameworks/ohprint/include", 28 "${print_utils_path}/include", 29 ] 30 31 cflags = [ 32 "-g", 33 "-O0", 34 "-Wno-unused-variable", 35 "-fno-omit-frame-pointer", 36 ] 37 38 cflags_cc = [] 39 40 deps = [ 41 "${print_path}/etc/init:printservice.rc", 42 "${print_path}/frameworks/innerkitsimpl/print_impl:print_client", 43 "${print_path}/frameworks/kits/extension:print_extension_framework", 44 "${print_path}/frameworks/kits/extension:print_extension_module", 45 "${print_path}/frameworks/models/print_models:print_models", 46 "${print_path}/interfaces/kits/jsnapi/print_extension:printextensionability_napi", 47 "${print_path}/interfaces/kits/jsnapi/print_extensionctx:printextensioncontext_napi", 48 "${print_path}/interfaces/kits/napi/print_napi:print_napi", 49 "${print_path}/profile:print_sa_profiles", 50 "${print_path}/services/print_service:print_service", 51 ] 52 53 sources = [ "printcupsattribute_fuzzer.cpp" ] 54 55 external_deps = [ 56 "ability_base:base", 57 "ability_base:want", 58 "ability_base:zuri", 59 "ability_runtime:ability_manager", 60 "ability_runtime:abilitykit_native", 61 "access_token:libaccesstoken_sdk", 62 "access_token:libaccesstoken_sdk", 63 "access_token:libnativetoken", 64 "access_token:libtoken_setproc", 65 "bundle_framework:appexecfwk_base", 66 "bundle_framework:appexecfwk_core", 67 "c_utils:utils", 68 "common_event_service:cesfwk_innerkits", 69 "drivers_interface_usb:libusb_proxy_1.0", 70 "eventhandler:libeventhandler", 71 "hilog:libhilog", 72 "hisysevent:libhisysevent", 73 "init:libbegetutil", 74 "ipc:ipc_core", 75 "napi:ace_napi", 76 "os_account:os_account_innerkits", 77 "safwk:system_ability_fwk", 78 "samgr:samgr_proxy", 79 "usb_manager:usbsrv_client", 80 "wifi:wifi_sdk", 81 ] 82 83 if (cups_enable) { 84 cflags_cc += [ "-DCUPS_ENABLE" ] 85 external_deps += [ 86 "cJSON:cjson", 87 "cups:cups", 88 "cups-filters:cupsfilters", 89 ] 90 } 91 92 if (security_guard_enabled) { 93 external_deps += [ 94 "security_guard:libsg_collect_sdk", 95 "time_service:time_client", 96 ] 97 } 98} 99 100############################################################################### 101group("fuzztest") { 102 testonly = true 103 deps = [] 104 deps += [ 105 # deps file 106 ":PrintCupsAttributeFuzzTest", 107 ] 108} 109############################################################################### 110