• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2023 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("BgTaskSubscriberFuzzTest") {
22  module_out_path = module_output_path
23  fuzz_config_file = "${bgtaskmgr_test_path}/fuzztest/bgtasksubscriber_fuzzer"
24
25  include_dirs = [
26    "../common",
27    "${target_gen_dir}",
28  ]
29
30  cflags = [
31    "-g",
32    "-O0",
33    "-Wno-unused-variable",
34    "-fno-omit-frame-pointer",
35    "-Dprivate=public",
36    "-Dprotected=public",
37  ]
38  sources = [
39    "../common/fuzztest_helper.cpp",
40    "bgtaskSubscriber_fuzzer.cpp",
41  ]
42
43  deps = [
44    "${bgtaskmgr_interfaces_path}/innerkits:background_task_mgr_proxy",
45    "${bgtaskmgr_interfaces_path}/innerkits:background_task_mgr_stub",
46    "${bgtaskmgr_interfaces_path}/innerkits:bgtaskmgr_innerkits",
47    "${bgtaskmgr_services_path}:bgtaskmgr_service_static",
48  ]
49
50  external_deps = [
51    "ability_base:base",
52    "ability_base:want",
53    "ability_base:zuri",
54    "ability_runtime:ability_manager",
55    "ability_runtime:app_manager",
56    "ability_runtime:wantagent_innerkits",
57    "access_token:libaccesstoken_sdk",
58    "access_token:libnativetoken_shared",
59    "access_token:libtoken_setproc",
60    "access_token:libtokenid_sdk",
61    "bundle_framework:appexecfwk_base",
62    "bundle_framework:appexecfwk_core",
63    "c_utils:utils",
64    "common_event_service:cesfwk_innerkits",
65    "eventhandler:libeventhandler",
66    "hilog:libhilog",
67    "hisysevent:libhisysevent",
68    "hitrace:libhitracechain",
69    "init:libbegetutil",
70    "ipc:ipc_single",
71    "resource_management:global_resmgr",
72    "safwk:system_ability_fwk",
73    "samgr:samgr_proxy",
74  ]
75}
76
77###############################################################################
78group("fuzztest") {
79  testonly = true
80  deps = []
81  deps += [
82    # deps file
83    ":BgTaskSubscriberFuzzTest",
84  ]
85}
86###############################################################################
87