1# Copyright (c) 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 14import("//build/test.gni") 15import("../../../powermgr.gni") 16 17module_output_path = "power_manager/power_manager" 18 19##############################fuzztest########################################## 20ohos_fuzztest("TakeOverShutdownCallbackFuzzTest") { 21 module_out_path = module_output_path 22 fuzz_config_file = 23 "${powermgr_root_path}/test/fuzztest/takeovershutdowncallback_fuzzer" 24 25 include_dirs = [ 26 "${powermgr_service_path}/native/src/shutdown", 27 "${powermgr_service_path}/native/src/suspend", 28 "${powermgr_service_path}/native/src/wakeup", 29 "../power_utils", 30 ] 31 32 if (power_manager_feature_wakeup_action) { 33 include_dirs += [ "${powermgr_service_path}/native/src/wakeup_action" ] 34 } 35 36 configs = [ 37 "${powermgr_utils_path}:coverage_flags", 38 "${powermgr_utils_path}:utils_config", 39 ] 40 41 cflags = [ 42 "-g", 43 "-O0", 44 "-Wno-unused-variable", 45 "-fno-omit-frame-pointer", 46 ] 47 sources = [ 48 "../power_utils/power_fuzzer.cpp", 49 "./takeovershutdowncallback_fuzzer_test.cpp", 50 ] 51 deps = [ 52 "${powermgr_service_path}:powermgr_stub", 53 "${powermgr_service_path}:powermgrservice", 54 "${powermgr_service_path}/native/src/actions:powermgr_actions", 55 "//third_party/jsoncpp:jsoncpp", 56 ] 57 58 external_deps = [ 59 "ability_runtime:ability_manager", 60 "c_utils:utils", 61 "ffrt:libffrt", 62 "hilog:libhilog", 63 "input:libmmi-client", 64 "ipc:ipc_core", 65 "power_manager:power_ffrt", 66 "sensor:sensor_interface_native", 67 ] 68} 69