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/test.gni")
17import("//foundation/resourceschedule/background_task_mgr/bgtaskmgr.gni")
18module_output_path = "background_task_mgr/background_task_mgr"
19
20##############################fuzztest##########################################
21ohos_fuzztest("BgTaskSubscriberStubOnRemoteFuzzTest") {
22  module_out_path = module_output_path
23  fuzz_config_file =
24      "${bgtaskmgr_test_path}/fuzztest/bgtasksubscriberstubonremote_fuzzer"
25
26  include_dirs = [ "../common" ]
27  cflags = [
28    "-g",
29    "-O0",
30    "-Wno-unused-variable",
31    "-fno-omit-frame-pointer",
32    "-Dprivate=public",
33    "-Dprotected=public",
34  ]
35  sources = [
36    "../common/fuzztest_helper.cpp",
37    "bgtasksubscriberstubonremote_fuzzer.cpp",
38  ]
39
40  deps = [
41    "${bgtaskmgr_interfaces_path}/innerkits:bgtaskmgr_innerkits",
42    "${bgtaskmgr_services_path}:bgtaskmgr_service_static",
43  ]
44
45  external_deps = [
46    "ability_base:base",
47    "ability_base:want",
48    "ability_base:zuri",
49    "ability_runtime:ability_manager",
50    "ability_runtime:app_manager",
51    "ability_runtime:wantagent_innerkits",
52    "access_token:libaccesstoken_sdk",
53    "access_token:libnativetoken",
54    "access_token:libtoken_setproc",
55    "access_token:libtokenid_sdk",
56    "bundle_framework:appexecfwk_base",
57    "bundle_framework:appexecfwk_core",
58    "c_utils:utils",
59    "common_event_service:cesfwk_innerkits",
60    "eventhandler:libeventhandler",
61    "hilog:libhilog",
62    "hisysevent:libhisysevent",
63    "init:libbegetutil",
64    "ipc:ipc_single",
65    "resource_management:global_resmgr",
66    "safwk:system_ability_fwk",
67    "samgr:samgr_proxy",
68  ]
69}
70
71###############################################################################
72group("fuzztest") {
73  testonly = true
74  deps = []
75  deps += [
76    # deps file
77    ":BgTaskSubscriberStubOnRemoteFuzzTest",
78  ]
79}
80###############################################################################
81