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. 13 14import("//build/test.gni") 15import("//foundation/multimedia/player_framework/config.gni") 16 17module_output_path = "player_framework/player_framework/player" 18 19ohos_unittest("player_timeout_unit_test") { 20 module_out_path = module_output_path 21 include_dirs = [ 22 "../../../common", 23 "./include", 24 "//foundation/multimedia/player_framework/interfaces/inner_api/native", 25 "//foundation/multimedia/player_framework/frameworks/native/player", 26 "//foundation/multimedia/player_framework/test/unittest/common/include", 27 "//foundation/multimedia/player_framework/services/include", 28 "//foundation/multimedia/player_framework/services/services/monitor/ipc", 29 "//foundation/multimedia/player_framework/services/services/sa_media/ipc", 30 "//foundation/multimedia/player_framework/services/include", 31 "src/data_source", 32 "src/loader_callback", 33 ] 34 35 cflags = [ 36 "-std=c++17", 37 "-fno-rtti", 38 "-fno-exceptions", 39 "-Wall", 40 "-fno-common", 41 "-fstack-protector-all", 42 "-Wshadow", 43 "-FPIC", 44 "-FS", 45 "-O2", 46 "-D_FORTIFY_SOURCE=2", 47 "-Wformat=2", 48 "-Wdate-time", 49 "-Dprivate=public", 50 "-Dprotected=public", 51 ] 52 53 if (player_framework_support_player) { 54 sources = [ "player_timeout_unit_test.cpp" ] 55 } 56 57 deps = [ 58 "$MEDIA_PLAYER_ROOT_DIR/interfaces/inner_api/native:media_client", 59 "$MEDIA_PLAYER_ROOT_DIR/services/services:media_service", 60 "$MEDIA_PLAYER_ROOT_DIR/services/utils:media_service_utils", 61 ] 62 63 external_deps = [ 64 "audio_framework:audio_client", 65 "av_codec:av_codec_client", 66 "c_utils:utils", 67 "drm_framework:drm_framework", 68 "googletest:gmock_main", 69 "graphic_2d:librender_service_client", 70 "graphic_surface:surface", 71 "hilog:libhilog", 72 "hitrace:libhitracechain", 73 "ipc:ipc_single", 74 "media_foundation:media_foundation", 75 "qos_manager:concurrent_task_client", 76 "window_manager:libwm", 77 ] 78 79 if (defined(global_parts_info) && 80 defined(global_parts_info.multimedia_histreamer_ext)) { 81 defines = [ "SUBSCRIBE_HISTREAMER_EXT" ] 82 } 83 84 if (player_framework_support_hiappevent) { 85 external_deps += [ "hiappevent:hiappevent_innerapi" ] 86 } 87 88 resource_config_file = "//foundation/multimedia/player_framework/test/unittest/resources/ohos_test.xml" 89} 90