1# Copyright (c) 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") 14 15module_output_path = "multimedia_av_session/session" 16 17############################################################################### 18config("module_private_config") { 19 visibility = [ ":*" ] 20 21 include_dirs = [ 22 "../../include/", 23 "../../../../../../interfaces/inner_api/native/session/include/", 24 "../../../../../services/session/server/", 25 ] 26} 27 28common_deps = [ 29 "//foundation/multimedia/av_session/frameworks/common:avsession_common", 30 "//foundation/multimedia/av_session/frameworks/native/session:avsession_client", 31 "//foundation/multimedia/av_session/services/session:avsession_service", 32 "//foundation/multimedia/av_session/utils:avsession_utils", 33 "//third_party/googletest:gtest_main", 34] 35 36common_external_deps = [ 37 "ability_base:want", 38 "ability_runtime:wantagent_innerkits", 39 "access_token:libaccesstoken_sdk", 40 "access_token:libnativetoken", 41 "access_token:libtoken_setproc", 42 "c_utils:utils", 43 "device_manager:devicemanagersdk", 44 "dsoftbus:softbus_client", 45 "hiviewdfx_hilog_native:libhilog", 46 "input:libmmi-client", 47 "ipc:ipc_core", 48 "multimedia_audio_framework:audio_client", 49 "multimedia_image_framework:image_native", 50 "samgr:samgr_proxy", 51] 52 53ohos_unittest("AVSessionManagerTest") { 54 module_out_path = module_output_path 55 56 sources = [ "avsession_manager_test.cpp" ] 57 58 configs = [ ":module_private_config" ] 59 60 deps = common_deps 61 62 external_deps = common_external_deps 63} 64 65ohos_unittest("AVSessionControllerTest") { 66 module_out_path = module_output_path 67 68 sources = [ "avsession_controller_test.cpp" ] 69 70 configs = [ ":module_private_config" ] 71 72 deps = common_deps 73 74 external_deps = common_external_deps 75} 76 77ohos_unittest("AVPlaybackStateTest") { 78 module_out_path = module_output_path 79 80 sources = [ "avplayback_state_test.cpp" ] 81 82 configs = [ ":module_private_config" ] 83 84 deps = common_deps 85 86 external_deps = common_external_deps 87} 88 89ohos_unittest("AVSessionTest") { 90 module_out_path = module_output_path 91 92 sources = [ "avsession_test.cpp" ] 93 94 configs = [ ":module_private_config" ] 95 96 deps = common_deps 97 98 external_deps = common_external_deps 99} 100 101ohos_unittest("AVMetaDataTest") { 102 module_out_path = module_output_path 103 104 sources = [ "avmeta_data_test.cpp" ] 105 106 configs = [ ":module_private_config" ] 107 108 deps = common_deps 109 110 external_deps = common_external_deps 111} 112 113ohos_unittest("AVSessionPermissionTest") { 114 module_out_path = module_output_path 115 116 sources = [ "avsession_permission_test.cpp" ] 117 118 configs = [ ":module_private_config" ] 119 120 deps = common_deps 121 122 external_deps = common_external_deps 123} 124 125ohos_unittest("AVSessionRemoteTest") { 126 module_out_path = module_output_path 127 128 sources = [ "avsession_remote_test.cpp" ] 129 130 configs = [ ":module_private_config" ] 131 132 deps = common_deps 133 134 external_deps = common_external_deps 135} 136 137############################################################################### 138group("unittest") { 139 testonly = true 140 141 deps = [ 142 ":AVMetaDataTest", 143 ":AVPlaybackStateTest", 144 ":AVSessionControllerTest", 145 ":AVSessionManagerTest", 146 ":AVSessionPermissionTest", 147 ":AVSessionRemoteTest", 148 ":AVSessionTest", 149 ] 150} 151############################################################################### 152