• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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/player_framework/player"
18
19ohos_unittest("player_server_unittest") {
20  module_out_path = module_output_path
21  include_dirs = [
22    "./include",
23    "$MEDIA_PLAYER_ROOT_DIR/interfaces/inner_api/native",
24    "$MEDIA_PLAYER_ROOT_DIR/frameworks/native/player",
25    "$MEDIA_PLAYER_ROOT_DIR/test/unittest/common/include",
26    "$MEDIA_PLAYER_ROOT_DIR/services/services/player/server",
27    "$MEDIA_PLAYER_ROOT_DIR/services/include",
28    "$MEDIA_PLAYER_ROOT_DIR/services/services/factory",
29    "$MEDIA_PLAYER_ROOT_DIR/services/services/engine_intf",
30    "$MEDIA_PLAYER_ROOT_DIR/services/utils/include",
31    "$MEDIA_PLAYER_ROOT_DIR/interfaces/inner_api/native",
32    "$MEDIA_PLAYER_ROOT_DIR/services/services/common",
33    "$MEDIA_PLAYER_ROOT_DIR/services/services/player/subscriber",
34  ]
35
36  cflags = [
37    "-Wall",
38    "-Werror",
39    "-Wno-deprecated-declarations",
40    "-Dprivate=public",
41    "-Dprotected=public",
42  ]
43
44  if (player_framework_support_player) {
45    sources = [
46      "src/player_server_mock.cpp",
47      "src/player_server_unittest.cpp",
48    ]
49  }
50
51  deps = [
52    "$MEDIA_PLAYER_ROOT_DIR/interfaces/inner_api/native:media_client",
53    "$MEDIA_PLAYER_ROOT_DIR/services/services:media_service",
54    "$MEDIA_PLAYER_ROOT_DIR/services/utils:media_service_utils",
55  ]
56
57  external_deps = [
58    "ability_runtime:ability_connect_callback_stub",
59    "access_token:libaccesstoken_sdk",
60    "access_token:libtokenid_sdk",
61    "audio_framework:audio_client",
62    "av_codec:av_codec_client",
63    "c_utils:utils",
64    "c_utils:utils",
65    "common_event_service:cesfwk_innerkits",
66    "ets_runtime:libark_jsruntime",
67    "graphic_2d:librender_service_base",
68    "graphic_2d:librender_service_client",
69    "graphic_surface:surface",
70    "hdf_core:libhdi",
71    "hicollie:libhicollie",
72    "hilog:libhilog",
73    "hilog:libhilog",
74    "hisysevent:libhisysevent",
75    "hitrace:hitrace_meter",
76    "hitrace:libhitracechain",
77    "i18n:intl_util",
78    "image_framework:image_native",
79    "init:libbegetutil",
80    "ipc:ipc_single",
81    "jsoncpp:jsoncpp",
82    "libxml2:libxml2",
83    "media_foundation:media_foundation",
84    "memmgr:memmgrclient",
85    "napi:ace_napi",
86    "os_account:os_account_innerkits",
87    "qos_manager:qos",
88    "window_manager:libwm",
89  ]
90
91  if (defined(global_parts_info) &&
92      defined(global_parts_info.multimedia_histreamer_ext)) {
93    defines = [ "SUBSCRIBE_HISTREAMER_EXT" ]
94  }
95
96  if (player_framework_support_drm) {
97    external_deps += [ "drm_framework:drm_framework" ]
98  }
99
100  resource_config_file =
101      "$MEDIA_PLAYER_ROOT_DIR/test/unittest/resources/ohos_test.xml"
102}
103