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("../../../codec.gni") 17 18ohos_unittest("codec_hdi_jpeg_test") { 19 module_out_path = "drivers_peripheral_codec/codec" 20 21 sources = [ "codec_hdi_jpeg_test.cpp" ] 22 23 if (is_standard_system) { 24 external_deps = [ 25 "c_utils:utils", 26 "drivers_interface_codec:libimage_proxy_2.0", 27 "drivers_interface_display:libdisplay_buffer_hdi_impl", 28 "drivers_interface_display:libdisplay_buffer_proxy_1.0", 29 "drivers_interface_display:libdisplay_composer_hdi_impl_1.2", 30 "drivers_interface_display:libdisplay_composer_proxy_1.0", 31 "graphic_surface:buffer_handle", 32 "hdf_core:libhdf_host", 33 "hdf_core:libhdf_ipc_adapter", 34 "hdf_core:libhdf_utils", 35 "hdf_core:libhdi", 36 "hilog:libhilog", 37 "ipc:ipc_single", 38 ] 39 } else { 40 external_deps = [ "hilog:libhilog" ] 41 } 42} 43 44ohos_unittest("codec_hdi_heif_encode_test") { 45 module_out_path = "drivers_peripheral_codec/codec" 46 47 sources = [ "codec_hdi_heif_encode_test.cpp" ] 48 49 if (is_standard_system) { 50 external_deps = [ 51 "c_utils:utils", 52 "drivers_interface_codec:libimage_proxy_2.0", 53 "drivers_interface_display:display_buffer_idl_headers_1.2", 54 "drivers_interface_display:display_composer_idl_headers_1.2", 55 "drivers_interface_display:libdisplay_buffer_hdi_impl_v1_2", 56 "drivers_interface_display:libdisplay_composer_hdi_impl_1.2", 57 "hdf_core:libhdf_host", 58 "hdf_core:libhdf_ipc_adapter", 59 "hdf_core:libhdf_utils", 60 "hdf_core:libhdi", 61 "hilog:libhilog", 62 "ipc:ipc_single", 63 ] 64 } else { 65 external_deps = [ "hilog:libhilog" ] 66 } 67 defines = [] 68 if (drivers_peripheral_codec_feature_support_heif_test) { 69 defines += [ "SUPPORT_HEIF" ] 70 } 71} 72 73group("codec_hdi_image_test") { 74 testonly = true 75 deps = [ 76 ":codec_hdi_heif_encode_test", 77 ":codec_hdi_jpeg_test", 78 ] 79} 80