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/ohos.gni") 17import("//build/test.gni") 18import("//foundation/ability/ability_runtime/ability_runtime.gni") 19module_output_path = "ability_runtime/abilitymgr" 20 21import("//foundation/ability/ability_runtime/js_environment/js_environment.gni") 22 23##############################fuzztest########################################## 24ohos_fuzztest("AbilityFrameworksNativeOhosJsEnvLoggerFuzzTest") { 25 module_out_path = module_output_path 26 27 fuzz_config_file = "${ability_runtime_test_path}/fuzztest/abilityframeworksnativeohosjsenvlogger_fuzzer" 28 include_dirs = [ 29 "${ability_runtime_innerkits_path}/ability_manager/include", 30 "${ability_runtime_innerkits_path}/dataobs_manager/include", 31 "${ability_runtime_native_path}/runtime", 32 "${ability_runtime_native_path}/runtime/utils/include", 33 "${ability_runtime_path}/interfaces/kits/native/appkit/ability_bundle_manager_helper", 34 "${ability_runtime_innerkits_path}/app_manager/include/appmgr", 35 "${ability_runtime_services_path}/abilitymgr/include/utils", 36 "${ability_runtime_services_path}/abilitymgr/include", 37 ] 38 cflags = [ 39 "-g", 40 "-O0", 41 "-Wno-unused-variable", 42 "-fno-omit-frame-pointer", 43 ] 44 sources = [ 45 "${ability_runtime_services_path}/abilitymgr/src/app_scheduler.cpp", 46 "${ability_runtime_services_path}/abilitymgr/src/utils/start_ability_utils.cpp", 47 "${ability_runtime_services_path}/abilitymgr/src/utils/state_utils.cpp", 48 "abilityframeworksnativeohosjsenvlogger_fuzzer.cpp", 49 ] 50 51 configs = [ 52 "${ability_runtime_innerkits_path}/ability_manager:ability_manager_public_config", 53 "${ability_runtime_services_path}/abilitymgr:abilityms_config", 54 ] 55 56 deps = [ 57 "${ability_runtime_innerkits_path}/ability_manager:ability_manager", 58 "${ability_runtime_innerkits_path}/ability_manager:ability_start_options", 59 "${ability_runtime_innerkits_path}/ability_manager:mission_info", 60 "${ability_runtime_innerkits_path}/app_manager:app_manager", 61 "${ability_runtime_native_path}/ability/native:abilitykit_native", 62 "${ability_runtime_native_path}/appkit:appkit_manager_helper", 63 "${ability_runtime_path}/utils/server/startup:startup_util", 64 "${ability_runtime_services_path}/abilitymgr:abilityms", 65 "${ability_runtime_services_path}/abilitymgr:ams_configuration_parameter", 66 "${ability_runtime_services_path}/common:app_util", 67 "${ability_runtime_services_path}/common:perm_verification", 68 ] 69 70 external_deps = [ 71 "ability_base:extractortool", 72 "ability_base:want", 73 "ability_base:zuri", 74 "ability_runtime:ability_deps_wrapper", 75 "ability_runtime:js_environment", 76 "ability_runtime:runtime", 77 "bundle_framework:appexecfwk_core", 78 "c_utils:utils", 79 "common_event_service:cesfwk_innerkits", 80 "dsoftbus:softbus_client", 81 "ets_runtime:libark_jsruntime", 82 "eventhandler:libeventhandler", 83 "ffrt:libffrt", 84 "hilog:libhilog", 85 "hisysevent:libhisysevent", 86 "hitrace:hitrace_meter", 87 "input:libmmi-client", 88 "ipc:ipc_core", 89 "jsoncpp:jsoncpp", 90 "libjpeg-turbo:turbojpeg", 91 "napi:ace_napi", 92 "safwk:api_cache_manager", 93 "samgr:samgr_proxy", 94 "zlib:libz", 95 "zlib:shared_libz", 96 ] 97 98 if (background_task_mgr_continuous_task_enable) { 99 external_deps += [ "background_task_mgr:bgtaskmgr_innerkits" ] 100 } 101 102 if (ability_runtime_graphics) { 103 deps += [] 104 external_deps += [ 105 "i18n:intl_util", 106 "window_manager:libwm", 107 ] 108 } 109 if (ability_runtime_upms) { 110 deps += [ 111 "${ability_runtime_innerkits_path}/uri_permission:uri_permission_mgr", 112 ] 113 } 114 cflags_cc = [] 115 if (os_dlp_part_enabled) { 116 cflags_cc += [ "-DWITH_DLP" ] 117 } 118} 119 120############################################################################### 121group("fuzztest") { 122 testonly = true 123 deps = [] 124 deps += [ 125 # deps file 126 ":AbilityFrameworksNativeOhosJsEnvLoggerFuzzTest", 127 ] 128} 129############################################################################### 130