• 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/test.gni")
16import("//foundation/ability/ability_runtime/ability_runtime.gni")
17##############################fuzztest##########################################
18module_output_path = "ability_runtime/appmgrservice"
19ohos_fuzztest("PreLoadUIExtStateObserverFuzzTest") {
20  module_out_path = module_output_path
21
22  fuzz_config_file =
23      "${ability_runtime_test_path}/fuzztest/preloaduiextstateobserver_fuzzer"
24
25  include_dirs = [
26    "${ability_runtime_services_path}/appmgr/include",
27    "${ability_runtime_innerkits_path}/ability_manager/include",
28    "${ability_runtime_innerkits_path}/app_manager/include/appmgr",
29    "${ability_runtime_path}/interfaces/kits/native/appkit/ability_bundle_manager_helper",
30    "${ability_runtime_services_path}/abilitymgr/include/utils",
31    "${ability_runtime_services_path}/common/include",
32  ]
33
34  cflags = [
35    "-g",
36    "-O0",
37    "-Wno-unused-variable",
38    "-fno-omit-frame-pointer",
39  ]
40  sources = [
41    "${ability_runtime_services_path}/abilitymgr/src/ui_extension/preload_uiext_state_observer.cpp",
42    "preloaduiextstateobserver_fuzzer.cpp",
43    "${ability_runtime_services_path}/common/src/json_utils.cpp",
44    "${ability_runtime_services_path}/abilitymgr/src/extension_record/extension_record.cpp",
45  ]
46
47  configs = [
48    "${ability_runtime_innerkits_path}/ability_manager:ability_manager_public_config",
49    "${ability_runtime_services_path}/abilitymgr:abilityms_config",
50  ]
51
52  deps = [
53    "${ability_runtime_innerkits_path}/ability_manager:ability_manager",
54    "${ability_runtime_innerkits_path}/ability_manager:ability_start_options",
55    "${ability_runtime_innerkits_path}/app_manager:app_manager",
56    "${ability_runtime_native_path}/ability/native:abilitykit_native",
57    "${ability_runtime_native_path}/appkit:appkit_manager_helper",
58    "${ability_runtime_path}/utils/global/freeze:freeze_util",
59    "${ability_runtime_path}/utils/server/startup:startup_util",
60    "${ability_runtime_services_path}/abilitymgr:abilityms",
61    "${ability_runtime_services_path}/common:app_util",
62    "${ability_runtime_services_path}/common:event_report",
63    "${ability_runtime_services_path}/common:perm_verification",
64    "${ability_runtime_services_path}/common:task_handler_wrap",
65    ]
66
67  external_deps = [
68    "ability_base:base",
69    "ability_base:configuration",
70    "ability_base:extractortool",
71    "ability_base:session_info",
72    "ability_base:view_data",
73    "ability_base:want",
74    "ability_base:zuri",
75    "access_token:libaccesstoken_sdk",
76    "access_token:libtokenid_sdk",
77    "bundle_framework:appexecfwk_base",
78    "bundle_framework:appexecfwk_core",
79    "bundle_framework:libappexecfwk_common",
80    "cJSON:cjson",
81    "c_utils:utils",
82    "common_event_service:cesfwk_core",
83    "common_event_service:cesfwk_innerkits",
84    "config_policy:configpolicy_util",
85    "dsoftbus:softbus_client",
86    "eventhandler:libeventhandler",
87    "faultloggerd:libbacktrace_local",
88    "ffrt:libffrt",
89    "hicollie:libhicollie",
90    "hilog:libhilog",
91    "hisysevent:libhisysevent",
92    "hitrace:hitrace_meter",
93    "icu:shared_icuuc",
94    "init:libbeget_proxy",
95    "init:libbegetutil",
96    "ipc:ipc_core",
97    "kv_store:distributeddata_inner",
98    "os_account:os_account_innerkits",
99    "qos_manager:concurrent_task_client",
100    "relational_store:native_appdatafwk",
101    "relational_store:native_dataability",
102    "relational_store:native_rdb",
103    "safwk:system_ability_fwk",
104    "samgr:samgr_proxy",
105    "window_manager:libmodal_system_ui_extension_client",
106    "window_manager:libwsutils",
107    "window_manager:scene_session",
108    "window_manager:session_manager_lite",
109    "window_manager:sms",
110    "ability_runtime:runtime",
111  ]
112}
113
114###############################################################################
115group("fuzztest") {
116  testonly = true
117  deps = []
118  deps += [
119    # deps file
120    ":PreLoadUIExtStateObserverFuzzTest",
121  ]
122}
123###############################################################################
124