• 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("BgTaskOnRemoteRequestFuzzTest") {
22  module_out_path = module_output_path
23  fuzz_config_file =
24      "${bgtaskmgr_test_path}/fuzztest/bgtaskonremoterequest_fuzzer"
25
26  include_dirs = [ "../common" ]
27  cflags = [
28    "-g",
29    "-O0",
30    "-Wno-unused-variable",
31    "-fno-omit-frame-pointer",
32  ]
33
34  cflags_cc = [
35    "-fvisibility=hidden",
36    "-fdata-sections",
37    "-ffunction-sections",
38    "-fvisibility-inlines-hidden",
39    "-Os",
40  ]
41
42  sources = [
43    "../common/fuzztest_helper.cpp",
44    "bgtaskonremoterequest_fuzzer.cpp",
45  ]
46
47  deps = [ "${bgtaskmgr_services_path}:bgtaskmgr_service_static" ]
48
49  external_deps = [
50    "ability_base:base",
51    "ability_base:want",
52    "ability_base:zuri",
53    "ability_runtime:ability_manager",
54    "ability_runtime:app_manager",
55    "ability_runtime:wantagent_innerkits",
56    "access_token:libaccesstoken_sdk",
57    "access_token:libnativetoken",
58    "access_token:libtoken_setproc",
59    "access_token:libtokenid_sdk",
60    "bundle_framework:appexecfwk_base",
61    "bundle_framework:appexecfwk_core",
62    "c_utils:utils",
63    "common_event_service:cesfwk_innerkits",
64    "eventhandler:libeventhandler",
65    "hilog:libhilog",
66    "hisysevent:libhisysevent",
67    "init:libbegetutil",
68    "ipc:ipc_single",
69    "resource_management:global_resmgr",
70    "safwk:system_ability_fwk",
71    "samgr:samgr_proxy",
72  ]
73
74  if (has_os_account_part) {
75    cflags_cc += [ "-DHAS_OS_ACCOUNT_PART" ]
76    external_deps += [ "os_account:os_account_innerkits" ]
77  }
78
79  if (distributed_notification_enable) {
80    cflags_cc += [ "-DDISTRIBUTED_NOTIFICATION_ENABLE" ]
81    external_deps += [ "distributed_notification_service:ans_innerkits" ]
82    sources += [ "${bgtaskmgr_services_path}/continuous_task/src/task_notification_subscriber.cpp" ]
83  }
84
85  if (background_task_mgr_graphics) {
86    cflags_cc += [ "-DSUPPORT_GRAPHICS" ]
87    external_deps += [ "i18n:intl_util" ]
88  }
89
90  subsystem_name = "resourceschedule"
91  part_name = "background_task_mgr"
92}
93
94###############################################################################
95group("fuzztest") {
96  testonly = true
97  deps = []
98  deps += [
99    # deps file
100    ":BgTaskOnRemoteRequestFuzzTest",
101  ]
102}
103###############################################################################
104