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/ohos.gni")
16import("//build/test.gni")
17import("//foundation/ability/ability_runtime/ability_runtime.gni")
18##############################fuzztest##########################################
19module_output_path = "ability_runtime/appmgrservice"
20ohos_fuzztest("AbilityAppFreezeManagerFuzzTest") {
21  module_out_path = module_output_path
22  fuzz_config_file =
23      "${ability_runtime_test_path}/fuzztest/abilityappfreezemanager_fuzzer"
24  include_dirs = [
25    "${ability_runtime_services_path}/appmgr/include",
26    "${ability_runtime_services_path}/abilitymgr/include",
27    "${ability_runtime_services_path}/appdfr/include",
28    "${ability_runtime_path}/utils/global/freeze/include",
29  ]
30
31  cflags = [
32    "-g",
33    "-O0",
34    "-Wno-unused-variable",
35    "-fno-omit-frame-pointer",
36  ]
37  sources = [ "abilityappfreezemanager_fuzzer.cpp" ]
38
39  deps = [
40    "${ability_runtime_innerkits_path}/app_manager:app_manager",
41    "${ability_runtime_path}/utils/global/freeze:freeze_util",
42    "${ability_runtime_services_path}/appmgr:libappms",
43    "${ability_runtime_services_path}/common:task_handler_wrap",
44  ]
45
46  external_deps = [
47    "ability_base:configuration",
48    "ability_base:want",
49    "appspawn:appspawn_client",
50    "bundle_framework:appexecfwk_base",
51    "bundle_framework:appexecfwk_core",
52    "c_utils:utils",
53    "faultloggerd:libdfx_dumpcatcher",
54    "faultloggerd:libfaultloggerd",
55    "ffrt:libffrt",
56    "hilog:libhilog",
57    "hisysevent:libhisysevent",
58    "hitrace:hitrace_meter",
59    "init:libbegetutil",
60    "init:libbegetutil",
61    "ipc:ipc_core",
62    "samgr:samgr_proxy",
63    "window_manager:libwm",
64  ]
65}
66
67###############################################################################
68group("fuzztest") {
69  testonly = true
70  deps = []
71  deps += [
72    # deps file
73    ":AbilityAppFreezeManagerFuzzTest",
74  ]
75}
76###############################################################################
77