1# Copyright (c) 2024 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("../../../../../config.gni") 16 17module_output_path = "multimedia_av_session/ndk" 18 19common_deps = [ 20 "../../../ohavsession:ohavsession", 21 "../../../session:avsession_client", 22] 23 24common_external_deps = [ 25 "ability_base:want", 26 "ability_base:zuri", 27 "ability_runtime:wantagent_innerkits", 28 "audio_framework:audio_client", 29 "c_utils:utils", 30 "curl:curl_shared", 31 "googletest:gtest", 32 "hilog:libhilog", 33 "image_framework:image", 34 "image_framework:image_native", 35 "input:libmmi-client", 36 "ipc:ipc_single", 37 "samgr:samgr_proxy", 38] 39 40ohos_unittest("OHAVMetadataBuilderTest") { 41 install_enable = true 42 visibility = [ ":*" ] 43 44 sanitize = { 45 cfi = true 46 cfi_cross_dso = true 47 cfi_vcall_icall_only = true 48 debug = false 49 } 50 51 include_dirs = [ 52 "../../../../../interfaces/inner_api/native/session/include", 53 "../../../../../interfaces/kits/c", 54 "../../include", 55 ] 56 57 cflags = [ 58 "-Wall", 59 "-Werror", 60 ] 61 62 sources = [ "./oh_av_metadata_builder_test.cpp" ] 63 64 deps = common_deps 65 66 external_deps = common_external_deps 67 68 module_out_path = module_output_path 69} 70 71ohos_unittest("OHAVSessionCallbackImplTest") { 72 install_enable = true 73 visibility = [ ":*" ] 74 75 sanitize = { 76 cfi = true 77 cfi_cross_dso = true 78 cfi_vcall_icall_only = true 79 debug = false 80 } 81 82 include_dirs = [ 83 "../../../../../interfaces/inner_api/native/session/include", 84 "../../../../../interfaces/kits/c", 85 "../../include", 86 ] 87 88 cflags = [ 89 "-Wall", 90 "-Werror", 91 "-fno-access-control", 92 ] 93 94 sources = [ "./oh_av_session_callbackimpl_test.cpp" ] 95 96 deps = common_deps 97 98 external_deps = common_external_deps 99 100 module_out_path = module_output_path 101} 102 103ohos_unittest("OHAVSessionTest") { 104 install_enable = true 105 visibility = [ ":*" ] 106 107 sanitize = { 108 cfi = true 109 cfi_cross_dso = true 110 cfi_vcall_icall_only = true 111 debug = false 112 } 113 114 include_dirs = [ 115 "../../../../../interfaces/inner_api/native/session/include", 116 "../../../../../interfaces/kits/c", 117 "../../include", 118 ] 119 120 cflags = [ 121 "-Wall", 122 "-Werror", 123 "-fno-access-control", 124 ] 125 126 sources = [ "./oh_av_session_test.cpp" ] 127 128 deps = common_deps 129 130 external_deps = common_external_deps 131 132 module_out_path = module_output_path 133} 134 135group("oh_av_session_unittest") { 136 testonly = true 137 deps = [ 138 ":OHAVMetadataBuilderTest", 139 ":OHAVSessionCallbackImplTest", 140 ":OHAVSessionTest", 141 ] 142} 143