• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2025 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("account_subscriber_unittest") {
20  module_out_path = module_output_path
21  include_dirs = [
22    "./",
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      "account_subscriber_unittest.cpp",
47    ]
48  }
49
50  deps = [
51    "$MEDIA_PLAYER_ROOT_DIR/interfaces/inner_api/native:media_client",
52    "$MEDIA_PLAYER_ROOT_DIR/services/services:media_service",
53  ]
54
55  external_deps = [
56    "ability_runtime:ability_connect_callback_stub",
57    "access_token:libaccesstoken_sdk",
58    "access_token:libtokenid_sdk",
59    "audio_framework:audio_client",
60    "av_codec:av_codec_client",
61    "c_utils:utils",
62    "c_utils:utils",
63    "common_event_service:cesfwk_innerkits",
64    "ets_runtime:libark_jsruntime",
65    "googletest:gmock",
66    "graphic_2d:librender_service_base",
67    "graphic_2d:librender_service_client",
68    "graphic_surface:surface",
69    "hdf_core:libhdi",
70    "hicollie:libhicollie",
71    "hilog:libhilog",
72    "hilog:libhilog",
73    "hisysevent:libhisysevent",
74    "hitrace:hitrace_meter",
75    "hitrace:libhitracechain",
76    "i18n:intl_util",
77    "image_framework:image_native",
78    "init:libbegetutil",
79    "ipc:ipc_single",
80    "jsoncpp:jsoncpp",
81    "libxml2:libxml2",
82    "media_foundation:media_foundation",
83    "memmgr:memmgrclient",
84    "napi:ace_napi",
85    "os_account:os_account_innerkits",
86    "qos_manager:qos",
87    "window_manager:libwm",
88  ]
89
90  if (defined(global_parts_info) &&
91      defined(global_parts_info.multimedia_histreamer_ext)) {
92    defines = [ "SUBSCRIBE_HISTREAMER_EXT" ]
93  }
94
95  if (player_framework_support_drm) {
96    external_deps += [ "drm_framework:drm_framework" ]
97  }
98
99  resource_config_file =
100      "$MEDIA_PLAYER_ROOT_DIR/test/unittest/resources/ohos_test.xml"
101}
102