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/test.gni") 15import("//device/board/${product_company}/${device_name}/device.gni") 16import("//drivers/hdf_core/adapter/uhdf2/uhdf.gni") 17import("//drivers/peripheral/camera/camera.gni") 18 19module_output_path = "$root_out_dir/test/unittest/hdf" 20config("v4l2_device_config") { 21 visibility = [ ":*" ] 22 cflags_cc = [ 23 "-DGST_DISABLE_DEPRECATED", 24 "-DHAVE_CONFIG_H", 25 "-DCOLORSPACE=\"videoconvert\"", 26 ] 27} 28ohos_unittest("camera_board_device_manager_unittest") { 29 testonly = true 30 module_out_path = module_output_path 31 sources = [ "$camera_path/device_manager/test/unittest/v4l2/utest_v4l2_device_manager.cpp" ] 32 include_dirs = [ 33 "$camera_path/device_manager", 34 "$camera_path/device_manager/include", 35 "$camera_path/device_manager/include/v4l2", 36 "$camera_path/device_manager/src", 37 "$camera_path/device_manager/src/v4l2", 38 "$camera_path/driver_adapter/include", 39 "$camera_path/include", 40 "$camera_path/device_manager/test/unittest/v4l2", 41 "$camera_path/utils/event", 42 "$camera_path/adapter/platform/v4l2/src/device_manager/include", 43 "$board_camera_path/device_manager/include", 44 "$camera_path/adapter/platform/v4l2/src/driver_adapter/include", 45 ] 46 deps = [ 47 "$board_camera_path/device_manager:camera_device_manager", 48 "//third_party/googletest:gmock_main", 49 "//third_party/googletest:gtest_main", 50 ] 51 if (is_standard_system) { 52 external_deps = [ 53 "c_utils:utils", 54 "graphic_chipsetsdk:surface", 55 "hdf_core:libhdf_utils", 56 "hilog:libhilog", 57 ] 58 } else { 59 external_deps = [ "hilog:libhilog" ] 60 } 61 external_deps += [ "drivers_interface_camera:metadata" ] 62 public_configs = [ ":v4l2_device_config" ] 63} 64