• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2022 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("//base/notification/distributed_notification_service/notification.gni")
16import("//build/config/features.gni")
17import("//build/test.gni")
18
19##############################fuzztest##########################################
20ohos_fuzztest("AnsManagerStubAnnexTwoFuzzTest") {
21  module_out_path = service_fuzz_test_path
22  fuzz_config_file =
23      "${component_path}/test/fuzztest/ansmanagerstubannextwo_fuzzer"
24
25  include_dirs = [
26    "${component_path}/test/fuzztest/fuzz_common_base",
27    "${services_path}/ans/include",
28    "${core_path}/include"
29  ]
30
31  cflags = [
32    "-g",
33    "-O0",
34    "-Wno-unused-variable",
35    "-fno-omit-frame-pointer",
36  ]
37  sources = [ "ansmanagerstubannextwo_fuzzer.cpp" ]
38
39  deps = [
40    "${component_path}/test/fuzztest/fuzz_common_base:fuzz_common_base",
41    "${frameworks_module_ans_path}:ans_innerkits",
42    "${services_path}/ans:ans_service_sources",
43  ]
44
45  external_deps = [
46    "ability_base:want",
47    "ability_base:zuri",
48    "c_utils:utils",
49    "ffrt:libffrt",
50    "hilog:libhilog",
51    "kv_store:distributeddata_inner",
52    "image_framework:image_native",
53    "ipc:ipc_single",
54    "relational_store:native_rdb",
55  ]
56
57    defines = []
58
59  if (is_double_framework) {
60    cflags += [ "-DCONFIG_DUAL_FRAMEWORK" ]
61  }
62
63  if (distributed_notification_supported) {
64    defines += [ "DISTRIBUTED_NOTIFICATION_SUPPORTED" ]
65    deps += [ "${services_path}/distributed:libans_distributed" ]
66    include_dirs += [ "${services_path}/distributed/include" ]
67  }
68
69  if (notification_smart_reminder_supported) {
70    defines += [ "NOTIFICATION_SMART_REMINDER_SUPPORTED" ]
71  }
72
73  if (player_framework) {
74    external_deps += [ "player_framework:media_client" ]
75    defines += [ "PLAYER_FRAMEWORK_ENABLE" ]
76  }
77
78  if (ans_hitrace_usage) {
79    external_deps += [ "hitrace:hitrace_meter" ]
80    defines += [ "HITRACE_METER_ENABLE" ]
81  }
82
83  if (ans_config_policy_enable) {
84    external_deps += [ "config_policy:configpolicy_util" ]
85    defines += [ "CONFIG_POLICY_ENABLE" ]
86  }
87
88  if (screenlock_mgr_enable) {
89    external_deps += [ "screenlock_mgr:screenlock_client" ]
90    defines += [ "SCREENLOCK_MGR_ENABLE" ]
91  }
92
93  if (distributed_notification_service_feature_additional_control) {
94    defines += [ "ENABLE_ANS_EXT_WRAPPER" ]
95  }
96
97  if (distributed_notification_service_feature_additional_control) {
98    defines += [ "ENABLE_ANS_ADDITIONAL_CONTROL" ]
99  }
100
101  if (distributed_notification_service_feature_summary) {
102    defines += [ "ENABLE_ANS_AGGREGATION" ]
103  }
104
105  if (telephony_cust) {
106    defines += [ "ENABLE_ANS_TELEPHONY_CUST_WRAPPER" ]
107  }
108
109  if (distributed_notification_service_feature_disable_fa_model) {
110    defines += [ "ANS_DISABLE_FA_MODEL" ]
111  }
112}
113
114###############################################################################
115group("fuzztest") {
116  testonly = true
117  deps = [ ":AnsManagerStubAnnexTwoFuzzTest" ]
118}
119###############################################################################
120