1# Copyright (c) 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 14#####################hydra-fuzz################### 15import("//build/config/features.gni") 16import("//build/test.gni") 17import("//foundation/distributedhardware/device_manager/device_manager.gni") 18##############################fuzztest########################################## 19ohos_fuzztest("PinAuthUiFuzzTest") { 20 module_out_path = "device_manager/devicemanager" 21 fuzz_config_file = "//foundation/distributedhardware/device_manager/test/fuzztest/pinauthui_fuzzer" 22 23 include_dirs = [ 24 "${devicemanager_path}/ext/pin_auth/include", 25 "${devicemanager_path}/ext/pin_auth/include/standard", 26 "${common_path}/include", 27 "${ext_path}/pin_auth/include/ability", 28 "${servicesimpl_path}/include/dependency/timer", 29 "${servicesimpl_path}/include/config", 30 "${servicesimpl_path}/include/adapter", 31 "${servicesimpl_path}/include/authentication", 32 "${servicesimpl_path}/include/authentication/showconfirm/standard", 33 "${servicesimpl_path}/include/ability", 34 "${servicesimpl_path}/include/devicestate", 35 "${servicesimpl_path}/include/discovery", 36 "${servicesimpl_path}/include/dependency/commonevent", 37 "${servicesimpl_path}/include/dependency/hichain", 38 "${servicesimpl_path}/include/dependency/softbus", 39 "${servicesimpl_path}/include/dependency/timer", 40 "${services_path}/include/", 41 "${services_path}/include/ipc", 42 "${services_path}/include/ipc/standard", 43 "${utils_path}/include", 44 "${utils_path}/include/ipc/standard", 45 "${servicesimpl_path}/include", 46 "${innerkits_path}/native_cpp/include", 47 "${common_path}/include/ipc", 48 "${common_path}/include/ipc/model", 49 "${innerkits_path}/native_cpp/include", 50 "${innerkits_path}/native_cpp/include/ipc", 51 "${innerkits_path}/native_cpp/include/ipc/standard", 52 "//third_party/json/include", 53 "//commonlibrary/c_utils/base/include", 54 "//utils/system/safwk/native/include", 55 "//base/notification/common_event_service/frameworks/core/include", 56 "//base/notification/common_event_service/interfaces/innerkits/native/include", 57 "//base/security/device_auth/interfaces/innerkits", 58 "//foundation/bundlemanager/bundle_framework/interfaces/inner_api/appexecfwk_core/include", 59 "//foundation/communication/dsoftbus/interfaces/inner_kits/transport", 60 "//foundation/communication/dsoftbus/interfaces/kits/bus_center", 61 "//foundation/communication/dsoftbus/interfaces/kits/common", 62 "//foundation/communication/ipc/interfaces/innerkits/ipc_core/include", 63 "//base/global/resource_management/interfaces/inner_api/include", 64 "//foundation/communication/dsoftbus/interfaces/kits/transport", 65 ] 66 67 cflags = [ 68 "-g", 69 "-O0", 70 "-Wno-unused-variable", 71 "-fno-omit-frame-pointer", 72 ] 73 74 sources = [ 75 "${devicemanager_path}/ext/pin_auth/src/ability/standard/dm_ability_manager.cpp", 76 "${devicemanager_path}/ext/pin_auth/src/pin_auth.cpp", 77 "${devicemanager_path}/ext/pin_auth/src/standard/pin_auth_ui.cpp", 78 "pinauthui_fuzzer.cpp", 79 ] 80 81 deps = [ 82 "${ability_runtime_innerkits_path}/ability_manager:ability_manager", 83 "${innerkits_path}/native_cpp:devicemanagersdk", 84 "//foundation/distributedhardware/device_manager/services/implementation:devicemanagerserviceimpl", 85 "//foundation/distributedhardware/device_manager/services/service:devicemanagerservice", 86 ] 87 88 defines = [ 89 "HI_LOG_ENABLE", 90 "DH_LOG_TAG=\"PinAuthUiFuzzTest\"", 91 "LOG_DOMAIN=0xD004100", 92 ] 93 94 external_deps = [ 95 "ability_base:want", 96 "init:libbegetutil", 97 ] 98} 99 100############################################################################### 101group("fuzztest") { 102 testonly = true 103 deps = [ ":PinAuthUiFuzzTest" ] 104} 105############################################################################### 106