1100ae2f9Sopenharmony_ci# Copyright (c) 2022 Huawei Device Co., Ltd.
2100ae2f9Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License");
3100ae2f9Sopenharmony_ci# you may not use this file except in compliance with the License.
4100ae2f9Sopenharmony_ci# You may obtain a copy of the License at
5100ae2f9Sopenharmony_ci#
6100ae2f9Sopenharmony_ci#     http://www.apache.org/licenses/LICENSE-2.0
7100ae2f9Sopenharmony_ci#
8100ae2f9Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software
9100ae2f9Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS,
10100ae2f9Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11100ae2f9Sopenharmony_ci# See the License for the specific language governing permissions and
12100ae2f9Sopenharmony_ci# limitations under the License.
13100ae2f9Sopenharmony_ci
14100ae2f9Sopenharmony_ci#####################hydra-fuzz###################
15100ae2f9Sopenharmony_ciimport("//base/notification/eventhandler/eventhandler.gni")
16100ae2f9Sopenharmony_ciimport("//build/config/features.gni")
17100ae2f9Sopenharmony_ciimport("//build/test.gni")
18100ae2f9Sopenharmony_ci
19100ae2f9Sopenharmony_ci##############################fuzztest##########################################
20100ae2f9Sopenharmony_ciohos_fuzztest("NativeImplementEventHandlerFuzzTest") {
21100ae2f9Sopenharmony_ci  module_out_path = eventhandler_fuzz_test_output_path
22100ae2f9Sopenharmony_ci  fuzz_config_file = "${fuzztest_path}/nativeimplementeventhandler_fuzzer"
23100ae2f9Sopenharmony_ci
24100ae2f9Sopenharmony_ci  include_dirs = [
25100ae2f9Sopenharmony_ci    "${inner_api_path}",
26100ae2f9Sopenharmony_ci    "${kits_path}/native",
27100ae2f9Sopenharmony_ci  ]
28100ae2f9Sopenharmony_ci  cflags = [
29100ae2f9Sopenharmony_ci    "-g",
30100ae2f9Sopenharmony_ci    "-O0",
31100ae2f9Sopenharmony_ci    "-Wno-unused-variable",
32100ae2f9Sopenharmony_ci    "-fno-omit-frame-pointer",
33100ae2f9Sopenharmony_ci  ]
34100ae2f9Sopenharmony_ci  sources = [ "nativeimplementeventhandler_fuzzer.cpp" ]
35100ae2f9Sopenharmony_ci
36100ae2f9Sopenharmony_ci  deps = [ "${frameworks_path}/eventhandler:libeventhandler" ]
37100ae2f9Sopenharmony_ci
38100ae2f9Sopenharmony_ci  external_deps = [
39100ae2f9Sopenharmony_ci    "c_utils:utils",
40100ae2f9Sopenharmony_ci    "ipc:ipc_single",
41100ae2f9Sopenharmony_ci  ]
42100ae2f9Sopenharmony_ci}
43100ae2f9Sopenharmony_ci
44100ae2f9Sopenharmony_ci###############################################################################
45100ae2f9Sopenharmony_cigroup("fuzztest") {
46100ae2f9Sopenharmony_ci  testonly = true
47100ae2f9Sopenharmony_ci  deps = []
48100ae2f9Sopenharmony_ci  deps += [ ":NativeImplementEventHandlerFuzzTest" ]
49100ae2f9Sopenharmony_ci}
50100ae2f9Sopenharmony_ci###############################################################################
51