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