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/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 sources = [ "./observer_unittest/incall_observer_func_unittest.cpp" ] 43 44 public_deps = [ "$MEDIA_PLAYER_ROOT_DIR/services/services:media_service" ] 45 46 deps = [ 47 "$MEDIA_PLAYER_ROOT_DIR/services/dfx:media_service_dfx", 48 "$MEDIA_PLAYER_ROOT_DIR/services/dfx:media_service_log_dfx", 49 "$MEDIA_PLAYER_ROOT_DIR/services/utils:media_service_utils", 50 ] 51 52 external_deps = [ 53 "ability_base:base", 54 "ability_base:want", 55 "ability_base:zuri", 56 "ability_runtime:ability_manager", 57 "ability_runtime:app_manager", 58 "ability_runtime:mission_info", 59 "access_token:libaccesstoken_sdk", 60 "access_token:libnativetoken_shared", 61 "access_token:libtokensetproc_shared", 62 "av_codec:av_codec_client", 63 "c_utils:utils", 64 "call_manager:tel_call_manager_api", 65 "core_service:tel_core_service_api", 66 "graphic_surface:surface", 67 "hilog:libhilog", 68 "init:libbegetutil", 69 "player_framework:media_client", 70 "state_registry:tel_state_registry_api", 71 "window_manager:libdm", 72 ] 73 74 defines = [] 75 defines += player_framework_defines 76 77 if (target_cpu == "arm") { 78 cflags += [ "-DBINDER_IPC_32BIT" ] 79 } 80} 81 82ohos_unittest("account_observer_unit_test") { 83 module_out_path = module_output_path 84 85 include_dirs = [ 86 "./", 87 "$MEDIA_PLAYER_ROOT_DIR/test/unittest/common/include", 88 "$MEDIA_PLAYER_ROOT_DIR/interfaces/inner_api/native", 89 "$MEDIA_PLAYER_ROOT_DIR/services/services/observer", 90 ] 91 92 sanitize = { 93 cfi = true 94 cfi_cross_dso = true 95 debug = false 96 } 97 98 cflags = [ 99 "-Wall", 100 "-Werror", 101 "-Dprivate=public", 102 "-Dprotected=public", 103 ] 104 105 sources = [ "./observer_unittest/account_observer_func_unittest.cpp" ] 106 107 public_deps = [ "$MEDIA_PLAYER_ROOT_DIR/services/services:media_service" ] 108 109 deps = [ 110 "$MEDIA_PLAYER_ROOT_DIR/services/dfx:media_service_dfx", 111 "$MEDIA_PLAYER_ROOT_DIR/services/dfx:media_service_log_dfx", 112 "$MEDIA_PLAYER_ROOT_DIR/services/utils:media_service_utils", 113 ] 114 115 external_deps = [ 116 "ability_base:base", 117 "ability_base:want", 118 "ability_base:zuri", 119 "ability_runtime:ability_manager", 120 "ability_runtime:app_manager", 121 "ability_runtime:mission_info", 122 "access_token:libaccesstoken_sdk", 123 "access_token:libnativetoken_shared", 124 "access_token:libtokensetproc_shared", 125 "av_codec:av_codec_client", 126 "c_utils:utils", 127 "call_manager:tel_call_manager_api", 128 "core_service:tel_core_service_api", 129 "graphic_surface:surface", 130 "hilog:libhilog", 131 "init:libbegetutil", 132 "os_account:os_account_innerkits", 133 "player_framework:media_client", 134 "state_registry:tel_state_registry_api", 135 "window_manager:libdm", 136 ] 137 138 defines = [] 139 defines += player_framework_defines 140 141 if (target_cpu == "arm") { 142 cflags += [ "-DBINDER_IPC_32BIT" ] 143 } 144} 145