1# Copyright (c) 2025 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/test.gni") 16import("//foundation/ability/ability_runtime/ability_runtime.gni") 17##############################fuzztest########################################## 18module_output_path = "ability_runtime/appmgrservice" 19ohos_fuzztest("AbilityAppMgrEventFirstFuzzTest") { 20 module_out_path = module_output_path 21 22 fuzz_config_file = 23 "${ability_runtime_test_path}/fuzztest/abilityappmgreventfirst_fuzzer" 24 25 include_dirs = 26 [ "${ability_runtime_innerkits_path}/app_manager/include/appmgr" ] 27 28 cflags = [ 29 "-g", 30 "-O0", 31 "-Wno-unused-variable", 32 "-fno-omit-frame-pointer", 33 ] 34 sources = [ 35 "${ability_runtime_services_path}/appmgr/src/app_mgr_event.cpp", 36 "${ability_runtime_services_path}/common/src/event_report.cpp", 37 "abilityappmgreventfirst_fuzzer.cpp", 38 ] 39 40 configs = [ "${ability_runtime_services_path}/appmgr:appmgr_config" ] 41 42 deps = [ 43 "${ability_runtime_services_path}/appmgr:libappms", 44 "${ability_runtime_services_path}/common:record_cost_time_util", 45 ] 46 47 external_deps = [ 48 "ability_base:configuration", 49 "ability_base:want", 50 "ability_runtime:app_manager", 51 "access_token:libaccesstoken_sdk", 52 "access_token:libnativetoken", 53 "access_token:libtoken_setproc", 54 "appspawn:appspawn_client", 55 "bundle_framework:appexecfwk_base", 56 "bundle_framework:appexecfwk_core", 57 "c_utils:utils", 58 "ffrt:libffrt", 59 "hilog:libhilog", 60 "hisysevent:libhisysevent", 61 "hitrace:hitrace_meter", 62 "init:libbeget_proxy", 63 "init:libbegetutil", 64 "ipc:ipc_core", 65 "safwk:system_ability_fwk", 66 "samgr:samgr_proxy", 67 ] 68 69 if (ability_runtime_graphics) { 70 external_deps += [ "window_manager:libwm" ] 71 } 72 73 defines = [] 74 if (background_task_mgr_continuous_task_enable) { 75 defines += [ "BGTASKMGR_CONTINUOUS_TASK_ENABLE" ] 76 } 77} 78 79############################################################################### 80group("fuzztest") { 81 testonly = true 82 deps = [] 83 deps += [ 84 # deps file 85 ":AbilityAppMgrEventFirstFuzzTest", 86 ] 87} 88############################################################################### 89