• 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/ringtone_library/ringtone_library.gni")
16
17group("unittest") {
18  testonly = true
19
20  deps = [ ":ringtone_helper_unittest" ]
21}
22
23ohos_unittest("ringtone_helper_unittest") {
24  module_out_path = "ringtone_library/ringtonelibraryextention"
25
26  include_dirs = [
27    "./include",
28    "../ringtone_unittest_utils/include",
29    "${RINGTONE_EXTENSION_PATH}/include",
30    "${RINGTONE_HELPER_PATH}/include",
31    "${RINGTONE_INTERFACES_PATH}/inner_api/native",
32    "${RINGTONE_UTILS_PATH}/include",
33  ]
34
35  sources = [
36    "./src/ringtone_asset_test.cpp",
37    "./src/ringtone_fetch_result_test.cpp",
38    "./src/simcard_setting_asset_test.cpp",
39    "./src/vibrate_asset_test.cpp",
40  ]
41
42  deps = [
43    "${RINGTONE_ROOT_PATH}/services:ringtone_data_extension",
44    "${RINGTONE_ROOT_PATH}/services/ringtone_helper:ringtone_data_helper",
45  ]
46
47  external_deps = [
48    "ability_base:zuri",
49    "ability_runtime:ability_context_native",
50    "ability_runtime:ability_manager",
51    "ability_runtime:app_context",
52    "ability_runtime:extensionkit_native",
53    "c_utils:utils",
54    "data_share:datashare_common",
55    "data_share:datashare_provider",
56    "ipc:ipc_single",
57    "napi:ace_napi",
58    "player_framework:media_client",
59    "relational_store:rdb_data_share_adapter",
60  ]
61
62  sanitize = {
63    cfi = true
64    cfi_cross_dso = true
65    debug = false
66  }
67
68  if (is_standard_system) {
69    external_deps += [ "hilog:libhilog" ]
70  } else {
71    external_deps += [ "hilog:libhilog" ]
72  }
73}
74