1# Copyright (c) 2023 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("AdvancedNotificationServiceFuzzTest") {
21  module_out_path = service_fuzz_test_path
22  fuzz_config_file =
23      "${component_path}/test/fuzztest/advancednotificationservice_fuzzer"
24
25  include_dirs = [
26    "${component_path}/test/fuzztest/fuzz_common_base",
27    "${component_path}/services/ans/include",
28    "${core_path}/common/include",
29    "${core_path}/include",
30    "${inner_api_path}",
31    "${ffrt_path}/interfaces/kits",
32  ]
33  cflags = [
34    "-g",
35    "-O0",
36    "-Wno-unused-variable",
37    "-fno-omit-frame-pointer",
38  ]
39  sources = [ "advancednotificationservice_fuzzer.cpp" ]
40
41  deps = [
42    "${component_path}/test/fuzztest/fuzz_common_base:fuzz_common_base",
43    "${frameworks_module_ans_path}:ans_innerkits",
44    "${services_path}/ans:libans",
45  ]
46
47  external_deps = [
48    "ability_base:want",
49    "ability_base:zuri",
50    "c_utils:utils",
51    "ffrt:libffrt",
52    "hilog:libhilog",
53    "image_framework:image_native",
54    "kv_store:distributeddata_inner",
55    "relational_store:native_rdb",
56  ]
57}
58
59###############################################################################
60group("fuzztest") {
61  testonly = true
62  deps = [ ":AdvancedNotificationServiceFuzzTest" ]
63}
64###############################################################################
65