1# Copyright (c) 2021-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
14import("//build/config/features.gni")
15import("//build/ohos.gni")
16import("//build/test.gni")
17import("../../../../hdf_core/adapter/uhdf2/uhdf.gni")
18import("../../camera.gni")
19
20include_dirs = [ "$camera_path/include" ]
21
22deps = [
23  "//drivers/interface/camera/v1_2:libcamera_proxy_1.2",
24  "//drivers/interface/camera/v1_2:libcamera_stub_1.2",
25]
26
27if (fuzztest_enable_bule_environment) {
28  include_dirs += [
29    "$camera_path/../../interfaces/include",
30    "$camera_path/../../interfaces/hdi_ipc",
31    "$camera_path/../../interfaces/hdi_ipc/utils/include",
32    "$camera_path/../../interfaces/hdi_ipc/callback/host/include",
33    "$camera_path/../../interfaces/hdi_ipc/callback/device/include",
34    "$camera_path/../../interfaces/hdi_ipc/callback/operator/include",
35    "$camera_path/../v4l2",
36    "$camera_path/../v4l2/include",
37    "$camera_path/../v4l2/include/camera_host",
38    "$camera_path/../v4l2/include/camera_device",
39    "$camera_path/../v4l2/include/stream_operator",
40    "$camera_path/../v4l2/include/offline_stream_operator",
41    "$camera_path/device_manager/include/",
42    "$camera_path/device_manager/include/mpi",
43    "$camera_path/pipeline_core/utils",
44    "$camera_path/pipeline_core/pipeline_impl/include",
45    "$camera_path/pipeline_core/host_stream/include",
46    "$camera_path/pipeline_core/include",
47    "$camera_path/pipeline_core/ipp/include",
48    "$camera_path/pipeline_core/nodes/include",
49    "$camera_path/utils/event",
50    "$camera_path/../v4l2/src/stream_operator/stream_tunnel/standard",
51  ]
52  deps += [
53    "$board_camera_path/device_manager:camera_device_manager",
54    "$board_camera_path/pipeline_core:camera_pipeline_core",
55    "$camera_path/../../hdi_service/v1_0:camera_host_service_1.0",
56    "$camera_path/buffer_manager:camera_buffer_manager",
57  ]
58}
59
60cflags = [
61  "-g",
62  "-O0",
63  "-fno-omit-frame-pointer",
64]
65
66external_deps = [
67  "drivers_interface_camera:metadata",
68  "hdf_core:libhdf_ipc_adapter",
69  "hdf_core:libhdf_utils",
70  "hdf_core:libhdi",
71  "hilog:libhilog",
72  "ipc:ipc_core",
73]
74
75group("camera_hdi_fuzztest") {
76  testonly = true
77  deps = []
78
79  deps += [
80    "camera_device:fuzztest",
81    "camera_host:fuzztest",
82    "defferred_delivery_image:fuzztest",
83    "stream_operator:fuzztest",
84  ]
85}
86