# Copyright (c) 2024 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. #####################hydra-fuzz################### import("//build/config/features.gni") import("//build/test.gni") import("//foundation/resourceschedule/device_standby/standby_service.gni") module_output_path = "device_standby/device_standby" ##############################fuzztest########################################## ohos_fuzztest("StateManagerAdapterFuzzTest") { module_out_path = module_output_path fuzz_config_file = "${standby_plugins_path}/test/fuzztest/statemanageradapter_fuzzer" include_dirs = [ "${standby_plugins_path}/ext/include", "${standby_service_constraints_path}/include", "${standby_service_message_listener_path}/include", "${standby_service_standby_state_path}/include", "${standby_service_strategy_path}/include", "${standby_utils_common_path}/include", "${standby_utils_policy_path}/include", ] cflags = [ "-g", "-O0", "-Wno-unused-variable", "-fno-omit-frame-pointer", ] cflags_cc = [ "-Dprivate=public", "-Dprotected=public", ] deps = [ "${standby_plugins_path}:standby_plugin_static", "${standby_service_frameworks_path}:standby_fwk", "${standby_service_path}:standby_service", "${standby_service_path}:standby_service_static", "${standby_utils_common_path}:standby_utils_common", "${standby_utils_policy_path}:standby_utils_policy", ] sources = [ "statemanageradapter_fuzzer.cpp" ] external_deps = [ "ability_base:want", "ability_runtime:app_manager", "ability_runtime:wantagent_innerkits", "access_token:libaccesstoken_sdk", "c_utils:utils", "common_event_service:cesfwk_innerkits", "eventhandler:libeventhandler", "hilog:libhilog", "init:libbegetutil", "ipc:ipc_single", "samgr:samgr_proxy", "time_service:time_client", ] if (standby_power_manager_enable) { external_deps += [ "power_manager:powermgr_client" ] defines = [ "STANDBY_POWER_MANAGER_ENABLE" ] } } ############################################################################### group("fuzztest") { testonly = true deps = [] deps += [ # deps file ":StateManagerAdapterFuzzTest", ] } ###############################################################################