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 ] 92 93 sources = [ "./oh_av_session_callbackimpl_test.cpp" ] 94 95 deps = common_deps 96 97 external_deps = common_external_deps 98 99 module_out_path = module_output_path 100} 101 102ohos_unittest("OHAVSessionTest") { 103 install_enable = true 104 visibility = [ ":*" ] 105 106 sanitize = { 107 cfi = true 108 cfi_cross_dso = true 109 cfi_vcall_icall_only = true 110 debug = false 111 } 112 113 include_dirs = [ 114 "../../../../../interfaces/inner_api/native/session/include", 115 "../../../../../interfaces/kits/c", 116 "../../include", 117 ] 118 119 cflags = [ 120 "-Wall", 121 "-Werror", 122 ] 123 124 sources = [ "./oh_av_session_test.cpp" ] 125 126 deps = common_deps 127 128 external_deps = common_external_deps 129 130 module_out_path = module_output_path 131} 132 133group("oh_av_session_unittest") { 134 testonly = true 135 deps = [ 136 ":OHAVMetadataBuilderTest", 137 ":OHAVSessionCallbackImplTest", 138 ":OHAVSessionTest", 139 ] 140} 141