1# Copyright (c) 2021-2022 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. 13import("//build/test.gni") 14import("//drivers/hdf_core/adapter/uhdf2/uhdf.gni") 15import("//test/xts/tools/build/suite.gni") 16 17module_output_path = "hats/codec" 18 19ohos_moduletest_suite("HatsHdfV1CodecTest") { 20 module_out_path = module_output_path 21 CODEC_OEM_PATH = rebase_path( 22 "//device/soc/${device_company}/${product_name}/hardware/codec") 23 cmd = "if [ -f ${CODEC_OEM_PATH}/BUILD.gn ]; then echo true; else echo false; fi" 24 HAVE_CODEC_OEM_PATH = 25 exec_script("//build/lite/run_shell_cmd.py", [ cmd ], "value") 26 27 if (HAVE_CODEC_OEM_PATH) { 28 include_dirs = [ 29 "${CODEC_OEM_PATH}/include", 30 "//drivers/peripheral/codec/interfaces/include", 31 "//drivers/peripheral/codec/hdi_service/codec_proxy", 32 "//drivers/peripheral/codec/hdi_service/codec_service_stub", 33 "//drivers/peripheral/codec/hal/v1.0/share_mem/include", 34 ] 35 sources = [ "codec_proxy_test.cpp" ] 36 } 37 38 cflags = [ 39 "-Wall", 40 "-Wextra", 41 "-Werror", 42 "-fsigned-char", 43 "-fno-common", 44 "-fno-strict-aliasing", 45 ] 46 47 deps = [ 48 "//drivers/peripheral/codec/hdi_service:codec_client", 49 "//drivers/peripheral/codec/hdi_service:codec_service", 50 "//third_party/googletest:gtest_main", 51 ] 52 53 if (is_standard_system) { 54 external_deps = [ 55 "c_utils:utils", 56 "drivers_peripheral_display:hdi_gralloc_client", 57 "graphic_chipsetsdk:buffer_handle", 58 "hdf_core:libhdf_host", 59 "hdf_core:libhdf_ipc_adapter", 60 "hdf_core:libhdf_utils", 61 "hdf_core:libhdi", 62 "hiviewdfx_hilog_native:libhilog", 63 ] 64 } else { 65 external_deps = [ "hilog:libhilog" ] 66 } 67 subsystem_name = "hdf" 68 part_name = "drivers_peripheral_codec" 69} 70