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