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_scanner_unittest" ] 213e5483f6Sopenharmony_ci} 223e5483f6Sopenharmony_ci 233e5483f6Sopenharmony_ciohos_unittest("ringtone_scanner_unittest") { 243e5483f6Sopenharmony_ci module_out_path = "ringtone_library/ringtonelibraryextention" 253e5483f6Sopenharmony_ci 263e5483f6Sopenharmony_ci include_dirs = [ 273e5483f6Sopenharmony_ci "./include", 283e5483f6Sopenharmony_ci "../ringtone_unittest_utils/include", 293e5483f6Sopenharmony_ci "${RINGTONE_EXTENSION_PATH}/include", 303e5483f6Sopenharmony_ci "${RINGTONE_SERVICES_PATH}/utils/include", 313e5483f6Sopenharmony_ci "${RINGTONE_INTERFACES_PATH}/inner_api/native", 323e5483f6Sopenharmony_ci "${RINGTONE_SCANNER_PATH}/include", 333e5483f6Sopenharmony_ci "../get_self_permissions/include", 343e5483f6Sopenharmony_ci ] 353e5483f6Sopenharmony_ci 363e5483f6Sopenharmony_ci sources = [ 373e5483f6Sopenharmony_ci "../get_self_permissions/src/get_self_permissions.cpp", 383e5483f6Sopenharmony_ci "../ringtone_unittest_utils/src/ringtone_unittest_utils.cpp", 393e5483f6Sopenharmony_ci "./src/ringtone_default_settings_test.cpp", 403e5483f6Sopenharmony_ci "./src/ringtone_metadata_extractor_test.cpp", 413e5483f6Sopenharmony_ci "./src/ringtone_scanner_db_test.cpp", 423e5483f6Sopenharmony_ci "./src/ringtone_scanner_test.cpp", 433e5483f6Sopenharmony_ci "./src/ringtone_scanner_unit_test.cpp", 443e5483f6Sopenharmony_ci "./src/ringtone_scanner_utils_test.cpp", 453e5483f6Sopenharmony_ci ] 463e5483f6Sopenharmony_ci 473e5483f6Sopenharmony_ci deps = [ 483e5483f6Sopenharmony_ci "${RINGTONE_ROOT_PATH}/services:ringtone_data_extension", 493e5483f6Sopenharmony_ci "${RINGTONE_ROOT_PATH}/services:ringtone_setting", 503e5483f6Sopenharmony_ci ] 513e5483f6Sopenharmony_ci 523e5483f6Sopenharmony_ci external_deps = [ 533e5483f6Sopenharmony_ci "ability_base:zuri", 543e5483f6Sopenharmony_ci "ability_runtime:ability_context_native", 553e5483f6Sopenharmony_ci "ability_runtime:ability_manager", 563e5483f6Sopenharmony_ci "ability_runtime:app_context", 573e5483f6Sopenharmony_ci "ability_runtime:extensionkit_native", 583e5483f6Sopenharmony_ci "access_token:libaccesstoken_sdk", 593e5483f6Sopenharmony_ci "access_token:libnativetoken", 603e5483f6Sopenharmony_ci "access_token:libtoken_setproc", 613e5483f6Sopenharmony_ci "c_utils:utils", 623e5483f6Sopenharmony_ci "data_share:datashare_common", 633e5483f6Sopenharmony_ci "data_share:datashare_provider", 643e5483f6Sopenharmony_ci "ipc:ipc_single", 653e5483f6Sopenharmony_ci "napi:ace_napi", 663e5483f6Sopenharmony_ci "player_framework:media_client", 673e5483f6Sopenharmony_ci "relational_store:native_rdb", 683e5483f6Sopenharmony_ci "relational_store:rdb_data_share_adapter", 693e5483f6Sopenharmony_ci ] 703e5483f6Sopenharmony_ci 713e5483f6Sopenharmony_ci sanitize = { 723e5483f6Sopenharmony_ci cfi = true 733e5483f6Sopenharmony_ci cfi_cross_dso = true 743e5483f6Sopenharmony_ci debug = false 753e5483f6Sopenharmony_ci } 763e5483f6Sopenharmony_ci 773e5483f6Sopenharmony_ci if (is_standard_system) { 783e5483f6Sopenharmony_ci external_deps += [ "hilog:libhilog" ] 793e5483f6Sopenharmony_ci } else { 803e5483f6Sopenharmony_ci external_deps += [ "hilog:libhilog" ] 813e5483f6Sopenharmony_ci } 823e5483f6Sopenharmony_ci} 83