1# Copyright (c) 2022 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("AbilityChildProcessRecordFuzzTest") {
20  module_out_path = module_output_path
21
22  fuzz_config_file =
23      "${ability_runtime_test_path}/fuzztest/abilitychildprocessrecord_fuzzer"
24
25  include_dirs = [
26    "${ability_runtime_innerkits_path}/ability_manager/include/",
27    "${ability_runtime_services_path}/appmgr/include/",
28    "{ability_runtime_services_path}/include/",
29    "${ability_runtime_innerkits_path}/app_manager/include/appmgr/",
30  ]
31
32  cflags = [
33    "-g",
34    "-O0",
35    "-Wno-unused-variable",
36    "-fno-omit-frame-pointer",
37  ]
38  sources = [
39    "${ability_runtime_innerkits_path}/app_manager/src/appmgr/child_process_args.cpp",
40    "${ability_runtime_innerkits_path}/app_manager/src/appmgr/child_process_options.cpp",
41    "${ability_runtime_innerkits_path}/app_manager/src/appmgr/child_process_request.cpp",
42    "${ability_runtime_services_path}/appmgr/src/child_process_record.cpp",
43    "abilitychildprocessrecord_fuzzer.cpp",
44  ]
45
46  configs = [ "${ability_runtime_services_path}/appmgr:appmgr_config" ]
47
48  deps = [
49    "${ability_runtime_innerkits_path}/app_manager:app_manager",
50    "${ability_runtime_innerkits_path}/deps_wrapper:ability_deps_wrapper",
51    "${ability_runtime_innerkits_path}/uri_permission:uri_permission_mgr",
52    "${ability_runtime_services_path}/appmgr:libappms",
53    "${ability_runtime_services_path}/common:event_report",
54    "${ability_runtime_services_path}/common:perm_verification",
55    "${ability_runtime_services_path}/common:task_handler_wrap",
56  ]
57
58  external_deps = [
59    "ability_base:base",
60    "ability_base:configuration",
61    "ability_base:want",
62    "access_token:libaccesstoken_sdk",
63    "appspawn:appspawn_client",
64    "bundle_framework:appexecfwk_base",
65    "bundle_framework:appexecfwk_core",
66    "c_utils:utils",
67    "common_event_service:cesfwk_innerkits",
68    "ffrt:libffrt",
69    "hicollie:libhicollie",
70    "hilog:libhilog",
71    "hisysevent:libhisysevent",
72    "hitrace:hitrace_meter",
73    "init:libbeget_proxy",
74    "init:libbegetutil",
75    "ipc:ipc_core",
76    "kv_store:distributeddata_mgr",
77    "memory_utils:libmeminfo",
78    "safwk:system_ability_fwk",
79    "samgr:samgr_proxy",
80    "window_manager:libwm",
81    "window_manager:libwsutils",
82  ]
83
84  if (ability_runtime_graphics) {
85    external_deps += [ "window_manager:libwm" ]
86  }
87}
88
89###############################################################################
90group("fuzztest") {
91  testonly = true
92  deps = []
93  deps += [
94    # deps file
95    ":AbilityChildProcessRecordFuzzTest",
96  ]
97}
98###############################################################################
99