1# Copyright (c) 2022-2023 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("../../../../standby_service.gni") 18module_output_path = "device_standby/device_standby" 19 20##############################fuzztest########################################## 21ohos_fuzztest("DeviceStandbyFuzzTest") { 22 module_out_path = module_output_path 23 fuzz_config_file = 24 "${standby_service_path}/test/fuzztest/devicestandby_fuzzer" 25 26 include_dirs = [ 27 "${standby_service_path}/include", 28 "${standby_innerkits_path}:standby_innerkits", 29 "${standby_utils_common_path}:standby_utils_common", 30 "${standby_utils_policy_path}:standby_utils_policy", 31 ] 32 33 cflags = [ 34 "-g", 35 "-O0", 36 "-Wno-unused-variable", 37 "-fno-omit-frame-pointer", 38 ] 39 40 deps = [ 41 "${standby_innerkits_path}:standby_innerkits", 42 "${standby_plugins_path}:standby_plugin", 43 "${standby_service_frameworks_path}:standby_fwk", 44 "${standby_service_path}:standby_service_static", 45 "${standby_utils_common_path}:standby_utils_common", 46 "${standby_utils_policy_path}:standby_utils_policy", 47 ] 48 49 sources = [ "devicestandby_fuzzer.cpp" ] 50 51 external_deps = [ 52 "ability_base:base", 53 "ability_base:want", 54 "ability_base:zuri", 55 "ability_runtime:app_manager", 56 "ability_runtime:wantagent_innerkits", 57 "access_token:libaccesstoken_sdk", 58 "access_token:libtokenid_sdk", 59 "bundle_framework:appexecfwk_base", 60 "c_utils:utils", 61 "common_event_service:cesfwk_innerkits", 62 "eventhandler:libeventhandler", 63 "hilog:libhilog", 64 "init:libbegetutil", 65 "ipc:ipc_single", 66 "power_manager:powermgr_client", 67 "safwk:system_ability_fwk", 68 "samgr:samgr_proxy", 69 "time_service:time_client", 70 ] 71} 72 73############################################################################### 74group("fuzztest") { 75 testonly = true 76 deps = [] 77 deps += [ 78 # deps file 79 ":DeviceStandbyFuzzTest", 80 ] 81} 82############################################################################### 83