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" 18 19ohos_unittest("player_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/window/window_manager/interfaces/innerkits/wm", 27 "//foundation/multimedia/player_framework/test/unittest/common/include", 28 "src/data_source", 29 "src/loader_callback", 30 ] 31 32 cflags = [ 33 "-Wall", 34 "-Werror", 35 "-Wno-deprecated-declarations", 36 ] 37 38 if (player_framework_support_player) { 39 sources = [ 40 "src/data_source/media_data_source_test_noseek.cpp", 41 "src/data_source/media_data_source_test_seekable.cpp", 42 "src/loader_callback/loader_callback_mock.cpp", 43 "src/player_mock.cpp", 44 "src/player_unit_test.cpp", 45 ] 46 } 47 48 deps = [ 49 "$MEDIA_PLAYER_ROOT_DIR/services/utils:media_service_utils", 50 "//foundation/graphic/graphic_2d/rosen/modules/render_service_client:librender_service_client", 51 "//foundation/multimedia/player_framework/interfaces/inner_api/native:media_client", 52 "//foundation/window/window_manager/wm:libwm", 53 ] 54 55 external_deps = [ 56 "audio_framework:audio_client", 57 "c_utils:utils", 58 "graphic_surface:surface", 59 "hilog:libhilog", 60 "ipc:ipc_single", 61 "media_foundation:media_foundation", 62 "qos_manager:concurrent_task_client", 63 ] 64 65 if (defined(global_parts_info) && 66 defined(global_parts_info.multimedia_histreamer_ext)) { 67 defines = [ "SUBSCRIBE_HISTREAMER_EXT" ] 68 } 69 70 resource_config_file = "//foundation/multimedia/player_framework/test/unittest/resources/ohos_test.xml" 71} 72