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("//foundation/multimedia/player_framework/config.gni") 16 17module_output_path = "player_framework/ScreenCapture/observer" 18 19ohos_unittest("incall_observer_unit_test") { 20 module_out_path = module_output_path 21 22 include_dirs = [ 23 "./", 24 "$MEDIA_PLAYER_ROOT_DIR/test/unittest/common/include", 25 "$MEDIA_PLAYER_ROOT_DIR/interfaces/inner_api/native", 26 "$MEDIA_PLAYER_ROOT_DIR/services/services/observer", 27 ] 28 29 sanitize = { 30 cfi = true 31 cfi_cross_dso = true 32 debug = false 33 } 34 35 cflags = [ 36 "-Wall", 37 "-Werror", 38 "-Dprivate=public", 39 "-Dprotected=public", 40 ] 41 42 if (player_framework_support_screen_capture && 43 player_framework_support_screen_capture_stopbycall) { 44 sources = [ "./observer_unittest/incall_observer_func_unittest.cpp" ] 45 } 46 47 public_deps = [ "$MEDIA_PLAYER_ROOT_DIR/services/services:media_service" ] 48 49 deps = [ 50 "$MEDIA_PLAYER_ROOT_DIR/services/dfx:media_service_dfx", 51 "$MEDIA_PLAYER_ROOT_DIR/services/dfx:media_service_log_dfx", 52 "$MEDIA_PLAYER_ROOT_DIR/services/utils:media_service_utils", 53 ] 54 55 external_deps = [ 56 "ability_base:base", 57 "ability_base:want", 58 "ability_base:zuri", 59 "ability_runtime:ability_manager", 60 "ability_runtime:app_manager", 61 "ability_runtime:mission_info", 62 "access_token:libaccesstoken_sdk", 63 "access_token:libnativetoken_shared", 64 "access_token:libtokensetproc_shared", 65 "audio_framework:audio_client", 66 "av_codec:av_codec_client", 67 "c_utils:utils", 68 "graphic_surface:surface", 69 "hilog:libhilog", 70 "init:libbegetutil", 71 "player_framework:media_client", 72 "qos_manager:qos", 73 "window_manager:libdm", 74 ] 75 if (player_framework_support_screen_capture && 76 player_framework_support_screen_capture_stopbycall) { 77 external_deps += [ 78 "call_manager:tel_call_manager_api", 79 "core_service:tel_core_service_api", 80 "state_registry:tel_state_registry_api", 81 ] 82 } 83 defines = [] 84 defines += player_framework_defines 85 86 if (target_cpu == "arm") { 87 cflags += [ "-DBINDER_IPC_32BIT" ] 88 } 89} 90 91ohos_unittest("account_observer_unit_test") { 92 module_out_path = module_output_path 93 94 include_dirs = [ 95 "./", 96 "$MEDIA_PLAYER_ROOT_DIR/test/unittest/common/include", 97 "$MEDIA_PLAYER_ROOT_DIR/interfaces/inner_api/native", 98 "$MEDIA_PLAYER_ROOT_DIR/services/services/observer", 99 ] 100 101 sanitize = { 102 cfi = true 103 cfi_cross_dso = true 104 debug = false 105 } 106 107 cflags = [ 108 "-Wall", 109 "-Werror", 110 "-Dprivate=public", 111 "-Dprotected=public", 112 ] 113 114 if (player_framework_support_screen_capture) { 115 sources = [ "./observer_unittest/account_observer_func_unittest.cpp" ] 116 } 117 118 public_deps = [ "$MEDIA_PLAYER_ROOT_DIR/services/services:media_service" ] 119 120 deps = [ 121 "$MEDIA_PLAYER_ROOT_DIR/services/dfx:media_service_dfx", 122 "$MEDIA_PLAYER_ROOT_DIR/services/dfx:media_service_log_dfx", 123 "$MEDIA_PLAYER_ROOT_DIR/services/utils:media_service_utils", 124 ] 125 126 external_deps = [ 127 "ability_base:base", 128 "ability_base:want", 129 "ability_base:zuri", 130 "ability_runtime:ability_manager", 131 "ability_runtime:app_manager", 132 "ability_runtime:mission_info", 133 "access_token:libaccesstoken_sdk", 134 "access_token:libnativetoken_shared", 135 "access_token:libtokensetproc_shared", 136 "audio_framework:audio_client", 137 "av_codec:av_codec_client", 138 "c_utils:utils", 139 "call_manager:tel_call_manager_api", 140 "core_service:tel_core_service_api", 141 "graphic_surface:surface", 142 "hilog:libhilog", 143 "init:libbegetutil", 144 "os_account:os_account_innerkits", 145 "player_framework:media_client", 146 "qos_manager:qos", 147 "state_registry:tel_state_registry_api", 148 "window_manager:libdm", 149 "eventhandler:libeventhandler", 150 ] 151 152 defines = [] 153 defines += player_framework_defines 154 155 if (target_cpu == "arm") { 156 cflags += [ "-DBINDER_IPC_32BIT" ] 157 } 158} 159