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