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 14#####################hydra-fuzz################### 15import("//build/config/features.gni") 16import("//build/test.gni") 17import("//foundation/resourceschedule/device_standby/standby_service.gni") 18module_output_path = "device_standby/device_standby" 19 20##############################fuzztest########################################## 21ohos_fuzztest("ConfigManagerFuzzTest") { 22 module_out_path = module_output_path 23 fuzz_config_file = 24 "${standby_service_utils_path}/test/fuzztest/configmanager_fuzzer" 25 26 include_dirs = [ 27 "${standby_utils_common_path}:standby_utils_common", 28 "${standby_utils_policy_path}:standby_utils_policy", 29 ] 30 31 cflags = [ 32 "-g", 33 "-O0", 34 "-Wno-unused-variable", 35 "-fno-omit-frame-pointer", 36 ] 37 38 cflags_cc = [ 39 "-Dprivate=public", 40 "-Dprotected=public", 41 ] 42 43 deps = [ 44 "${standby_utils_common_path}:standby_utils_common", 45 "${standby_utils_policy_path}:standby_utils_policy_static", 46 ] 47 48 sources = [ "configmanager_fuzzer.cpp" ] 49 50 external_deps = [ 51 "c_utils:utils", 52 "hilog:libhilog", 53 "ipc:ipc_single", 54 "json:nlohmann_json_static", 55 ] 56} 57 58############################################################################### 59group("fuzztest") { 60 testonly = true 61 deps = [] 62 deps += [ 63 # deps file 64 ":ConfigManagerFuzzTest", 65 ] 66} 67############################################################################### 68