11ebd3d54Sopenharmony_ci# Copyright (c) 2023 Huawei Device Co., Ltd.
21ebd3d54Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License");
31ebd3d54Sopenharmony_ci# you may not use this file except in compliance with the License.
41ebd3d54Sopenharmony_ci# You may obtain a copy of the License at
51ebd3d54Sopenharmony_ci#
61ebd3d54Sopenharmony_ci#     http://www.apache.org/licenses/LICENSE-2.0
71ebd3d54Sopenharmony_ci#
81ebd3d54Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software
91ebd3d54Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS,
101ebd3d54Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
111ebd3d54Sopenharmony_ci# See the License for the specific language governing permissions and
121ebd3d54Sopenharmony_ci# limitations under the License.
131ebd3d54Sopenharmony_ci
141ebd3d54Sopenharmony_ci#####################hydra-fuzz###################
151ebd3d54Sopenharmony_ciimport("//build/config/features.gni")
161ebd3d54Sopenharmony_ciimport("//build/test.gni")
171ebd3d54Sopenharmony_ciimport("//foundation/resourceschedule/background_task_mgr/bgtaskmgr.gni")
181ebd3d54Sopenharmony_cimodule_output_path = "background_task_mgr/background_task_mgr"
191ebd3d54Sopenharmony_ci
201ebd3d54Sopenharmony_ci##############################fuzztest##########################################
211ebd3d54Sopenharmony_ciohos_fuzztest("BgTaskSubscriberFuzzTest") {
221ebd3d54Sopenharmony_ci  module_out_path = module_output_path
231ebd3d54Sopenharmony_ci  fuzz_config_file = "${bgtaskmgr_test_path}/fuzztest/bgtasksubscriber_fuzzer"
241ebd3d54Sopenharmony_ci
251ebd3d54Sopenharmony_ci  include_dirs = [ "../common" ]
261ebd3d54Sopenharmony_ci  cflags = [
271ebd3d54Sopenharmony_ci    "-g",
281ebd3d54Sopenharmony_ci    "-O0",
291ebd3d54Sopenharmony_ci    "-Wno-unused-variable",
301ebd3d54Sopenharmony_ci    "-fno-omit-frame-pointer",
311ebd3d54Sopenharmony_ci    "-Dprivate=public",
321ebd3d54Sopenharmony_ci    "-Dprotected=public",
331ebd3d54Sopenharmony_ci  ]
341ebd3d54Sopenharmony_ci  sources = [
351ebd3d54Sopenharmony_ci    "../common/fuzztest_helper.cpp",
361ebd3d54Sopenharmony_ci    "bgtaskSubscriber_fuzzer.cpp",
371ebd3d54Sopenharmony_ci  ]
381ebd3d54Sopenharmony_ci
391ebd3d54Sopenharmony_ci  deps = [
401ebd3d54Sopenharmony_ci    "${bgtaskmgr_interfaces_path}/innerkits:bgtaskmgr_innerkits",
411ebd3d54Sopenharmony_ci    "${bgtaskmgr_services_path}:bgtaskmgr_service_static",
421ebd3d54Sopenharmony_ci  ]
431ebd3d54Sopenharmony_ci
441ebd3d54Sopenharmony_ci  external_deps = [
451ebd3d54Sopenharmony_ci    "ability_base:base",
461ebd3d54Sopenharmony_ci    "ability_base:want",
471ebd3d54Sopenharmony_ci    "ability_base:zuri",
481ebd3d54Sopenharmony_ci    "ability_runtime:ability_manager",
491ebd3d54Sopenharmony_ci    "ability_runtime:app_manager",
501ebd3d54Sopenharmony_ci    "ability_runtime:wantagent_innerkits",
511ebd3d54Sopenharmony_ci    "access_token:libaccesstoken_sdk",
521ebd3d54Sopenharmony_ci    "access_token:libnativetoken",
531ebd3d54Sopenharmony_ci    "access_token:libtoken_setproc",
541ebd3d54Sopenharmony_ci    "access_token:libtokenid_sdk",
551ebd3d54Sopenharmony_ci    "bundle_framework:appexecfwk_base",
561ebd3d54Sopenharmony_ci    "bundle_framework:appexecfwk_core",
571ebd3d54Sopenharmony_ci    "c_utils:utils",
581ebd3d54Sopenharmony_ci    "common_event_service:cesfwk_innerkits",
591ebd3d54Sopenharmony_ci    "eventhandler:libeventhandler",
601ebd3d54Sopenharmony_ci    "hilog:libhilog",
611ebd3d54Sopenharmony_ci    "hisysevent:libhisysevent",
621ebd3d54Sopenharmony_ci    "init:libbegetutil",
631ebd3d54Sopenharmony_ci    "ipc:ipc_single",
641ebd3d54Sopenharmony_ci    "resource_management:global_resmgr",
651ebd3d54Sopenharmony_ci    "safwk:system_ability_fwk",
661ebd3d54Sopenharmony_ci    "samgr:samgr_proxy",
671ebd3d54Sopenharmony_ci  ]
681ebd3d54Sopenharmony_ci}
691ebd3d54Sopenharmony_ci
701ebd3d54Sopenharmony_ci###############################################################################
711ebd3d54Sopenharmony_cigroup("fuzztest") {
721ebd3d54Sopenharmony_ci  testonly = true
731ebd3d54Sopenharmony_ci  deps = []
741ebd3d54Sopenharmony_ci  deps += [
751ebd3d54Sopenharmony_ci    # deps file
761ebd3d54Sopenharmony_ci    ":BgTaskSubscriberFuzzTest",
771ebd3d54Sopenharmony_ci  ]
781ebd3d54Sopenharmony_ci}
791ebd3d54Sopenharmony_ci###############################################################################
80