• 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("media_service_helper_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/media_service_helper",
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/services/media_service_helper/ipc",
31  ]
32
33  cflags = [
34    "-std=c++17",
35    "-fno-rtti",
36    "-fno-exceptions",
37    "-Wall",
38    "-fno-common",
39    "-fstack-protector-all",
40    "-Wshadow",
41    "-FPIC",
42    "-FS",
43    "-O2",
44    "-D_FORTIFY_SOURCE=2",
45    "-Wformat=2",
46    "-Wdate-time",
47    "-Dprivate=public",
48    "-Dprotected=public",
49  ]
50
51  sources = [ "media_service_helper_unit_test.cpp" ]
52
53  deps = [
54    "$MEDIA_PLAYER_ROOT_DIR/interfaces/inner_api/native:media_client",
55    "$MEDIA_PLAYER_ROOT_DIR/frameworks/native/media_service_helper:media_helper_client",
56    "$MEDIA_PLAYER_ROOT_DIR/services/services:media_service",
57    "$MEDIA_PLAYER_ROOT_DIR/services/utils:media_service_utils",
58  ]
59
60  external_deps = [
61    "audio_framework:audio_client",
62    "av_codec:av_codec_client",
63    "c_utils:utils",
64    "googletest:gmock_main",
65    "hilog:libhilog",
66    "image_framework:image_native",
67    "ipc:ipc_single",
68  ]
69
70  if (defined(global_parts_info) &&
71      defined(global_parts_info.multimedia_histreamer_ext)) {
72    defines = [ "SUBSCRIBE_HISTREAMER_EXT" ]
73  }
74
75  resource_config_file = "//foundation/multimedia/player_framework/test/unittest/resources/ohos_test.xml"
76}
77