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/ohos.gni")
17import("//build/test.gni")
18import("//foundation/ability/dmsfwk/dmsfwk.gni")
19ohos_fuzztest("BundleManagerCallBackStubFuzzTest") {
20  module_out_path = module_output_path
21
22  visibility = [ ":*" ]
23  include_dirs = [
24    "${dms_path}/common/include/",
25    "${dms_path}/interfaces/innerkits/common/include/",
26    "${dms_path}/services/dtbschedmgr/include/",
27    "${dms_path}/services/dtbschedmgr/include/collaborate/",
28    "${dms_path}/test/fuzztest/bundlemanagercallbackstub_fuzzer",
29    "${dms_path}/test/fuzztest/util",
30  ]
31
32  fuzz_config_file =
33      "${dms_path}/test/fuzztest/bundlemanagercallbackstub_fuzzer"
34
35  configs = [ "${dms_path}/services/dtbschedmgr/test/resource:coverage_flags" ]
36
37  cflags = [
38    "-g",
39    "-O0",
40    "-Wno-unused-variable",
41    "-fno-omit-frame-pointer",
42    "-Dprivate=public",
43  ]
44
45  sources = [
46    "${dms_path}/test/fuzztest/util/mock_fuzz_util.cpp",
47    "bundlemanagercallbackstub_fuzzer.cpp",
48  ]
49
50  deps = [ "${dms_path}/services/dtbschedmgr:distributedschedsvr" ]
51
52  defines = []
53  if (dmsfwk_mission_manager) {
54    defines += [ "SUPPORT_DISTRIBUTED_MISSION_MANAGER" ]
55  }
56
57  external_deps = [
58    "ability_base:base",
59    "ability_base:want",
60    "ability_base:zuri",
61    "ability_runtime:ability_manager",
62    "ability_runtime:app_manager",
63    "ability_runtime:dataobs_manager",
64    "ability_runtime:mission_info",
65    "access_token:libaccesstoken_sdk",
66    "access_token:libnativetoken_shared",
67    "access_token:libtokensetproc_shared",
68    "bundle_framework:appexecfwk_base",
69    "bundle_framework:appexecfwk_core",
70    "cJSON:cjson",
71    "c_utils:utils",
72    "data_share:datashare_consumer",
73    "device_auth:deviceauth_sdk",
74    "device_info_manager:distributed_device_profile_common",
75    "device_info_manager:distributed_device_profile_sdk",
76    "device_manager:devicemanagersdk",
77    "device_security_level:dslm_sdk",
78    "distributed_bundle_framework:dbms_fwk",
79    "dsoftbus:softbus_client",
80    "eventhandler:libeventhandler",
81    "hilog:libhilog",
82    "hisysevent:libhisysevent",
83    "hitrace:hitrace_meter",
84    "hitrace:libhitracechain",
85    "init:libbegetutil",
86    "ipc:ipc_core",
87    "kv_store:distributeddata_inner",
88    "safwk:system_ability_fwk",
89    "samgr:samgr_proxy",
90  ]
91}
92
93group("fuzztest") {
94  testonly = true
95  deps = [ ":BundleManagerCallBackStubFuzzTest" ]
96}
97