13e5483f6Sopenharmony_ci# Copyright (C) 2024 Huawei Device Co., Ltd.
23e5483f6Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License");
33e5483f6Sopenharmony_ci# you may not use this file except in compliance with the License.
43e5483f6Sopenharmony_ci# You may obtain a copy of the License at
53e5483f6Sopenharmony_ci#
63e5483f6Sopenharmony_ci#     http://www.apache.org/licenses/LICENSE-2.0
73e5483f6Sopenharmony_ci#
83e5483f6Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software
93e5483f6Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS,
103e5483f6Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
113e5483f6Sopenharmony_ci# See the License for the specific language governing permissions and
123e5483f6Sopenharmony_ci# limitations under the License.
133e5483f6Sopenharmony_ci
143e5483f6Sopenharmony_ciimport("//build/test.gni")
153e5483f6Sopenharmony_ciimport("//foundation/multimedia/ringtone_library/ringtone_library.gni")
163e5483f6Sopenharmony_ci
173e5483f6Sopenharmony_cigroup("unittest") {
183e5483f6Sopenharmony_ci  testonly = true
193e5483f6Sopenharmony_ci
203e5483f6Sopenharmony_ci  deps = [ ":ringtone_unittest" ]
213e5483f6Sopenharmony_ci}
223e5483f6Sopenharmony_ci
233e5483f6Sopenharmony_ciohos_unittest("ringtone_unittest") {
243e5483f6Sopenharmony_ci  module_out_path = "ringtone_library/ringtonelibraryextention"
253e5483f6Sopenharmony_ci
263e5483f6Sopenharmony_ci  include_dirs = [
273e5483f6Sopenharmony_ci    "./include",
283e5483f6Sopenharmony_ci    "../get_self_permissions/include",
293e5483f6Sopenharmony_ci    "${RINGTONE_SCANNER_PATH}/include",
303e5483f6Sopenharmony_ci    "${RINGTONE_EXTENSION_PATH}/include",
313e5483f6Sopenharmony_ci    "${RINGTONE_SERVICES_PATH}/utils/include",
323e5483f6Sopenharmony_ci    "${RINGTONE_INTERFACES_PATH}/inner_api/native",
333e5483f6Sopenharmony_ci  ]
343e5483f6Sopenharmony_ci
353e5483f6Sopenharmony_ci  sources = [
363e5483f6Sopenharmony_ci    "../get_self_permissions/src/get_self_permissions.cpp",
373e5483f6Sopenharmony_ci    "./src/ringtone_unittest.cpp",
383e5483f6Sopenharmony_ci  ]
393e5483f6Sopenharmony_ci
403e5483f6Sopenharmony_ci  deps =
413e5483f6Sopenharmony_ci      [ "${RINGTONE_ROOT_PATH}/services/ringtone_helper:ringtone_data_helper" ]
423e5483f6Sopenharmony_ci
433e5483f6Sopenharmony_ci  external_deps = [
443e5483f6Sopenharmony_ci    "ability_base:zuri",
453e5483f6Sopenharmony_ci    "ability_runtime:abilitykit_native",
463e5483f6Sopenharmony_ci    "access_token:libaccesstoken_sdk",
473e5483f6Sopenharmony_ci    "access_token:libnativetoken",
483e5483f6Sopenharmony_ci    "access_token:libtoken_setproc",
493e5483f6Sopenharmony_ci    "c_utils:utils",
503e5483f6Sopenharmony_ci    "common_event_service:cesfwk_innerkits",
513e5483f6Sopenharmony_ci    "data_share:datashare_consumer",
523e5483f6Sopenharmony_ci    "hitrace:hitrace_meter",
533e5483f6Sopenharmony_ci    "ipc:ipc_single",
543e5483f6Sopenharmony_ci    "relational_store:native_rdb",
553e5483f6Sopenharmony_ci    "samgr:samgr_proxy",
563e5483f6Sopenharmony_ci  ]
573e5483f6Sopenharmony_ci
583e5483f6Sopenharmony_ci  sanitize = {
593e5483f6Sopenharmony_ci    cfi = true
603e5483f6Sopenharmony_ci    cfi_cross_dso = true
613e5483f6Sopenharmony_ci    debug = false
623e5483f6Sopenharmony_ci  }
633e5483f6Sopenharmony_ci
643e5483f6Sopenharmony_ci  if (is_standard_system) {
653e5483f6Sopenharmony_ci    external_deps += [ "hilog:libhilog" ]
663e5483f6Sopenharmony_ci  } else {
673e5483f6Sopenharmony_ci    external_deps += [ "hilog:libhilog" ]
683e5483f6Sopenharmony_ci  }
693e5483f6Sopenharmony_ci}
70