1# Copyright (c) 2021 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/web/webview/web_aafwk.gni")
16import("//build/config/features.gni")
17import("//build/test.gni")
18import("$webview_path/config.gni")
19
20##############################fuzztest##########################################
21ohos_fuzztest("OhosImageDecoderAdapterImplFuzzTest") {
22  module_out_path = webview_fuzz_test_path
23  fuzz_config_file =
24      "$webview_path/test/fuzztest/ohos_adapter/ohosimageadapter_fuzzer"
25  include_dirs = [
26    "$webview_path/ohos_adapter/interfaces",
27    "$webview_path/ohos_adapter/ohos_image_adapter/include",
28    "$webview_path/test/fuzztest",
29  ]
30  cflags = [
31    "-g",
32    "-O0",
33    "-Wno-unused-variable",
34    "-fno-omit-frame-pointer",
35  ]
36
37  include_dirs += [
38    "../ohos_nweb/include",
39    "aafwk_adapter/include",
40    "access_token_adapter/include",
41    "audio_adapter/include",
42    "battery_mgr_adapter/include",
43    "camera_adapter/include",
44    "cert_mgr_adapter/include",
45    "datashare_adapter/include",
46    "date_time_format_adapter/include",
47    "display_manager_adapter/include",
48    "distributeddatamgr_adapter/webdatabase/include",
49    "enterprise_device_management_adapter/include",
50    "event_handler_adapter/include",
51    "flowbuffer_adapter/include",
52    "graphic_adapter/include",
53    "hiviewdfx_adapter/include",
54    "inputmethodframework_adapter/include",
55    "keystore_adapter/include",
56    "location_adapter/include",
57    "media_adapter/include",
58    "multimodalinput_adapter/include",
59    "net_connect_adapter/include",
60    "net_proxy_adapter/include",
61    "ohos_adapter_helper/include",
62    "ohos_image_adapter/include",
63    "ohos_init_web_adapter/include",
64    "ohos_resource_adapter/include",
65    "pasteboard_adapter/include",
66    "power_mgr_adapter/include",
67    "print_manager_adapter/include",
68    "screen_capture_adapter/include",
69    "soc_perf_adapter/include",
70    "system_properties_adapter/include",
71  ]
72
73  include_dirs +=
74      [ "//foundation/multimedia/image_framework/interfaces/innerkits/include" ]
75
76  sources = [ "ohosimagedecoderadapterimpl_fuzzer.cpp" ]
77  deps = [
78    "$webview_path/ohos_adapter:nweb_ohos_adapter",
79    "$webview_path/ohos_nweb:libnweb",
80  ]
81
82  external_deps = [
83    "c_utils:utils",
84    "eventhandler:libeventhandler",
85    "image_framework:image",
86    "image_framework:image_native",
87  ]
88}
89
90###############################################################################
91group("fuzztest") {
92  testonly = true
93  deps = []
94  deps += [
95    # deps file
96    ":OhosImageDecoderAdapterImplFuzzTest",
97  ]
98}
99###############################################################################
100