• 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
17##################################################################################################################
18ohos_unittest("utils_unit_test") {
19  module_out_path = "player_framework/services/utils"
20
21  cflags = [
22    "-std=c++17",
23    "-fno-rtti",
24    "-fno-exceptions",
25    "-Wall",
26    "-fno-common",
27    "-fstack-protector-all",
28    "-Wshadow",
29    "-FPIC",
30    "-FS",
31    "-O2",
32    "-D_FORTIFY_SOURCE=2",
33    "-Wformat=2",
34    "-Wdate-time",
35    "-Dprivate=public",
36    "-Dprotected=public",
37  ]
38
39  include_dirs = [
40    "$MEDIA_PLAYER_ROOT_DIR/services/utils/include",
41    "$MEDIA_PLAYER_ROOT_DIR/interfaces/inner_api/native",
42    "$MEDIA_PLAYER_ROOT_DIR/services/services/engine_intf",
43  ]
44
45  cflags_cc = cflags
46
47  sources = [
48    "$MEDIA_PLAYER_ROOT_DIR/services/utils/uri_helper.cpp",
49    "$MEDIA_PLAYER_ROOT_DIR/services/utils/watchdog.cpp",
50    "uri_helper_unit_test.cpp",
51    "watchdog_unit_test.cpp",
52  ]
53
54  public_external_deps = []
55  if (!is_arkui_x) {
56    public_external_deps += [ "json:nlohmann_json_static" ]
57  }
58
59  external_deps = [
60    "audio_framework:audio_capturer",
61    "audio_framework:audio_client",
62    "c_utils:utils",
63    "ffmpeg:libohosffmpeg",
64    "googletest:gmock_main",
65    "graphic_surface:surface",
66    "graphic_surface:sync_fence",
67    "hilog:libhilog",
68    "hisysevent:libhisysevent",
69    "hitrace:libhitracechain",
70    "init:libbegetutil",
71    "ipc:ipc_single",
72    "media_foundation:media_foundation",
73    "media_foundation:native_media_core",
74    "safwk:system_ability_fwk",
75  ]
76}
77