1# Copyright (c) 2024 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
14import("../../../camera.gni")
15
16import("//build/ohos.gni")
17import("//build/test.gni")
18
19module_output_path = "drivers_peripheral_camera/drivers_peripheral_camera"
20
21config("cam_meta_utils_config") {
22  visibility = [ ":*" ]
23  cflags_cc = [
24    "-DGST_DISABLE_DEPRECATED",
25    "-DHAVE_CONFIG_H",
26    "-DCOLORSPACE=\"videoconvert\"",
27  ]
28}
29
30ohos_fuzztest("metadata_utils_fuzztest") {
31  testonly = true
32  module_out_path = module_output_path
33  fuzz_config_file = "$camera_path/../../test/fuzztest/metadata_utils"
34  sources = [ "./metadata_utils_fuzzer.cpp" ]
35
36  include_dirs = [
37    "$camera_path/../../../interface/camera/metadata/include",
38    "$camera_path/include",
39  ]
40  cflags = [
41    "-g",
42    "-O0",
43    "-Wno-unused-variable",
44    "-fno-omit-frame-pointer",
45  ]
46
47  external_deps = [
48    "c_utils:utils",
49    "hdf_core:libhdf_host",
50    "hdf_core:libhdf_ipc_adapter",
51    "hdf_core:libhdf_utils",
52    "hdf_core:libhdi",
53    "hilog:libhilog",
54    "ipc:ipc_single",
55  ]
56
57  external_deps += [
58    "drivers_interface_camera:libbuffer_producer_sequenceable_1.0",
59    "drivers_interface_camera:libcamera_proxy_1.2",
60    "drivers_interface_camera:libcamera_proxy_1.3",
61    "drivers_interface_camera:metadata",
62    "graphic_surface:surface",
63    "samgr:samgr_proxy",
64  ]
65  public_configs = [ ":cam_meta_utils_config" ]
66}
67
68group("fuzztest") {
69  testonly = true
70  deps = []
71  deps += [
72    # dep file
73    ":metadata_utils_fuzztest",
74  ]
75}
76