# Copyright (C) 2024 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import("//build/test.gni") import("//foundation/multimedia/ringtone_library/ringtone_library.gni") group("unittest") { testonly = true deps = [ ":ringtone_data_extension_unittest" ] } ohos_unittest("ringtone_data_extension_unittest") { module_out_path = "ringtone_library/ringtonelibraryextention" include_dirs = [ "./include", "${RINGTONE_EXTENSION_PATH}/include", "${RINGTONE_SERVICES_PATH}/utils/include", "${RINGTONE_INTERFACES_PATH}/inner_api/native", "../get_self_permissions/include", ] sources = [ "../get_self_permissions/src/get_self_permissions.cpp", "./src/ringtone_bundle_manager_test.cpp", "./src/ringtone_data_manager_test.cpp", "./src/ringtone_datashare_extension_test.cpp", "./src/ringtone_datashare_stub_impl_test.cpp", "./src/ringtone_language_manager_test.cpp", "./src/ringtone_rdbstore_test.cpp", "./src/ringtone_subscriber_test.cpp", ] deps = [ "${RINGTONE_ROOT_PATH}/services:ringtone_data_extension", "${RINGTONE_ROOT_PATH}/services:ringtone_utils", "${RINGTONE_ROOT_PATH}/services/ringtone_helper:ringtone_data_helper", ] external_deps = [ "ability_base:want", "ability_base:zuri", "ability_runtime:ability_context_native", "ability_runtime:ability_manager", "ability_runtime:abilitykit_native", "ability_runtime:app_context", "ability_runtime:appkit_native", "access_token:libaccesstoken_sdk", "access_token:libnativetoken", "access_token:libprivacy_sdk", "access_token:libtoken_setproc", "bundle_framework:appexecfwk_base", "bundle_framework:appexecfwk_core", "c_utils:utils", "common_event_service:cesfwk_innerkits", "data_share:datashare_common", "data_share:datashare_consumer", "data_share:datashare_provider", "ipc:ipc_single", "napi:ace_napi", "relational_store:native_rdb", "relational_store:rdb_data_share_adapter", ] sanitize = { cfi = true cfi_cross_dso = true debug = false } if (is_standard_system) { external_deps += [ "hilog:libhilog" ] } else { external_deps += [ "hilog:libhilog" ] } }