1# Copyright (c) 2024-2025 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("../../../distributed_av_transport.gni") 16 17module_out_path = 18 "distributed_hardware_fwk/distributed_hardware_fwk/av_sync_utils_test" 19 20ohos_unittest("AvSyncUtilsTest") { 21 module_out_path = module_out_path 22 23 include_dirs = [ 24 "${common_path}/include", 25 "${plugin_path}/core", 26 "${plugin_path}/interface", 27 "${output_controller_path}/include", 28 "${plugin_path}/interface", 29 ] 30 31 sources = [ 32 "ashmem_mock.cpp", 33 "av_sync_utils_test.cpp", 34 ] 35 36 deps = [ 37 "${dh_fwk_sdk_path}:libdhfwk_sdk", 38 "${dh_fwk_services_path}/distributedhardwarefwkservice:distributedhardwarefwksvr", 39 ] 40 41 if (histreamer_compile_part) { 42 external_deps = [ 43 "media_foundation:histreamer_base", 44 "media_foundation:histreamer_codec_filters", 45 "media_foundation:histreamer_ffmpeg_convert", 46 "media_foundation:histreamer_plugin_base", 47 ] 48 } 49 50 external_deps += [ 51 "bounds_checking_function:libsec_shared", 52 "cJSON:cjson", 53 "c_utils:utils", 54 "googletest:gmock", 55 "googletest:gmock_main", 56 "ipc:ipc_core", 57 "hilog:libhilog", 58 ] 59 60 cflags = [ 61 "-O2", 62 "-fPIC", 63 "-Wall", 64 "-fexceptions", 65 "-Dprivate = public", 66 "-Dprotected = public", 67 ] 68 69 defines = [ 70 "HI_LOG_ENABLE", 71 "DH_LOG_TAG=\"av_sync_utils_test\"", 72 "LOG_DOMAIN=0xD004101", 73 ] 74 75 cflags_cc = cflags 76} 77 78group("av_sync_utils_test") { 79 testonly = true 80 deps = [ ":AvSyncUtilsTest" ] 81} 82