• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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/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
21##############################fuzztest##########################################
22ohos_fuzztest("KeepAliveProcessManagerTenthFuzzTest") {
23  module_out_path = module_output_path
24
25  fuzz_config_file =
26      "${ability_runtime_test_path}/fuzztest/keepaliveprocessmanagertenth_fuzzer"
27  include_dirs = [
28    "${ability_runtime_innerkits_path}/ability_manager/include",
29    "${ability_runtime_innerkits_path}/app_manager/include/appmgr",
30    "${ability_runtime_path}/interfaces/kits/native/appkit/ability_bundle_manager_helper",
31    "${ability_runtime_services_path}/abilitymgr/include/utils",
32    "${ability_runtime_services_path}/abilitymgr/include/keep_alive",
33    "${ability_runtime_services_path}/common/include",
34    "${ability_runtime_test_path}/fuzztest/",
35  ]
36  cflags = [
37    "-g",
38    "-O0",
39    "-Wno-unused-variable",
40    "-fno-omit-frame-pointer",
41  ]
42  sources = [
43    "${ability_runtime_innerkits_path}/app_manager/src/appmgr/app_mgr_client.cpp",
44    "${ability_runtime_innerkits_path}/app_manager/src/appmgr/app_service_manager.cpp",
45    "${ability_runtime_native_path}/appkit/ability_bundle_manager_helper/bundle_mgr_helper.cpp",
46    "${ability_runtime_services_path}/abilitymgr/src/keep_alive/ability_keep_alive_data_manager.cpp",
47    "${ability_runtime_services_path}/abilitymgr/src/keep_alive/ability_keep_alive_service.cpp",
48    "${ability_runtime_services_path}/abilitymgr/src/keep_alive/keep_alive_info.cpp",
49    "${ability_runtime_services_path}/abilitymgr/src/keep_alive/keep_alive_process_manager.cpp",
50    "${ability_runtime_services_path}/abilitymgr/src/process_options.cpp",
51    "${ability_runtime_services_path}/common/src/app_utils.cpp",
52    "${ability_runtime_services_path}/common/src/json_utils.cpp",
53    "${ability_runtime_services_path}/common/src/permission_verification.cpp",
54    "${ability_runtime_services_path}/common/src/record_cost_time_util.cpp",
55    "keepaliveprocessmanagertenth_fuzzer.cpp",
56  ]
57
58  configs = [
59    "${ability_runtime_innerkits_path}/ability_manager:ability_manager_public_config",
60    "${ability_runtime_services_path}/abilitymgr:abilityms_config",
61  ]
62
63  deps = [
64    "${ability_runtime_innerkits_path}/ability_manager:ability_manager",
65    "${ability_runtime_innerkits_path}/ability_manager:mission_info",
66    "${ability_runtime_native_path}/ability/native:abilitykit_native",
67    "${ability_runtime_path}/utils/server/startup:startup_util",
68    "${ability_runtime_services_path}/abilitymgr:abilityms",
69    "${ability_runtime_services_path}/common:record_cost_time_util",
70  ]
71
72  external_deps = [
73    "ability_base:base",
74    "ability_base:want",
75    "access_token:libaccesstoken_sdk",
76    "access_token:libtokenid_sdk",
77    "background_task_mgr:bgtaskmgr_innerkits",
78    "bundle_framework:appexecfwk_base",
79    "bundle_framework:appexecfwk_core",
80    "c_utils:utils",
81    "common_event_service:cesfwk_core",
82    "common_event_service:cesfwk_innerkits",
83    "config_policy:configpolicy_util",
84    "eventhandler:libeventhandler",
85    "ffrt:libffrt",
86    "hilog:libhilog",
87    "hitrace:hitrace_meter",
88    "hisysevent:libhisysevent",
89    "init:libbeget_proxy",
90    "input:libmmi-client",
91    "ipc:ipc_core",
92    "kv_store:distributeddata_inner",
93    "napi:ace_napi",
94    "relational_store:native_dataability",
95    "relational_store:native_rdb",
96    "safwk:system_ability_fwk",
97    "samgr:samgr_proxy",
98    "window_manager:libwsutils",
99    "window_manager:scene_session",
100    "window_manager:session_manager_lite",
101  ]
102
103  if (ability_runtime_child_process) {
104    defines = [ "SUPPORT_CHILD_PROCESS" ]
105  }
106
107  if (ability_runtime_graphics) {
108    deps += []
109    external_deps += [
110      "i18n:intl_util",
111      "window_manager:libwm",
112    ]
113  }
114  if (ability_runtime_upms) {
115    deps += [
116      "${ability_runtime_innerkits_path}/uri_permission:uri_permission_mgr",
117    ]
118  }
119}
120
121###############################################################################
122group("fuzztest") {
123  testonly = true
124  deps = []
125  deps += [
126    # deps file
127    ":KeepAliveProcessManagerTenthFuzzTest",
128  ]
129}
130###############################################################################
131