1# Copyright (c) 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/ohos.gni") 15import("//build/test.gni") 16import("../../../../../hdf_core/adapter/uhdf2/uhdf.gni") 17import("../../../camera.gni") 18 19module_output_path = "drivers_peripheral_camera/camera" 20camera_test_path = "//drivers/peripheral/camera/test/hdi/" 21 22config("camhdi_sequenceable_ut_config") { 23 visibility = [ ":*" ] 24 cflags_cc = [ 25 "-DGST_DISABLE_DEPRECATED", 26 "-DHAVE_CONFIG_H", 27 "-DCOLORSPACE=\"videoconvert\"", 28 "--coverage", 29 ] 30 cflags = [ "--coverage" ] 31 ldflags = [ "--coverage" ] 32} 33 34ohos_unittest("camera_hdi_sequenceable_ut") { 35 testonly = true 36 module_out_path = module_output_path 37 sources = [ 38 "$camera_test_path/sequenceable_test/src/camera_hdi_sequenceable_test.cpp", 39 ] 40 41 include_dirs = [ 42 # common includes 43 "$camera_test_path/sequenceable_test/include", 44 ] 45 46 deps = [ 47 "//third_party/googletest:gmock_main", 48 "//third_party/googletest:gtest", 49 "//third_party/googletest:gtest_main", 50 ] 51 52 if (is_standard_system) { 53 external_deps = [ 54 "c_utils:utils", 55 "hdf_core:libhdf_host", 56 "hdf_core:libhdf_ipc_adapter", 57 "hdf_core:libhdf_utils", 58 "hdf_core:libhdi", 59 "hilog:libhilog", 60 "ipc:ipc_single", 61 ] 62 } else { 63 external_deps = [ "hilog:libhilog" ] 64 } 65 66 external_deps += [ 67 "drivers_interface_camera:libbuffer_handle_sequenceable_1.0", 68 "drivers_interface_camera:libbuffer_producer_sequenceable_1.0", 69 "drivers_interface_camera:libcamera_proxy_1.0", 70 "drivers_interface_camera:libmap_data_sequenceable_1.0", 71 "drivers_interface_camera:metadata", 72 "graphic_surface:surface", 73 "samgr:samgr_proxy", 74 ] 75 public_configs = [ ":camhdi_sequenceable_ut_config" ] 76} 77