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_unittest" ] 21} 22 23ohos_unittest("ringtone_unittest") { 24 module_out_path = "ringtone_library/ringtonelibraryextention" 25 26 include_dirs = [ 27 "./include", 28 "../get_self_permissions/include", 29 "${RINGTONE_SCANNER_PATH}/include", 30 "${RINGTONE_EXTENSION_PATH}/include", 31 "${RINGTONE_SERVICES_PATH}/utils/include", 32 "${RINGTONE_INTERFACES_PATH}/inner_api/native", 33 "${RINGTONE_HELPER_PATH}/include", 34 ] 35 36 sources = [ 37 "../get_self_permissions/src/get_self_permissions.cpp", 38 "./src/ringtone_unittest.cpp", 39 ] 40 41 deps = 42 [ "${RINGTONE_ROOT_PATH}/services/ringtone_helper:ringtone_data_helper" ] 43 44 external_deps = [ 45 "ability_base:zuri", 46 "ability_runtime:abilitykit_native", 47 "access_token:libaccesstoken_sdk", 48 "access_token:libnativetoken", 49 "access_token:libtoken_setproc", 50 "c_utils:utils", 51 "common_event_service:cesfwk_innerkits", 52 "data_share:datashare_consumer", 53 "hitrace:hitrace_meter", 54 "ipc:ipc_single", 55 "relational_store:native_rdb", 56 "samgr:samgr_proxy", 57 ] 58 59 sanitize = { 60 cfi = true 61 cfi_cross_dso = true 62 debug = false 63 } 64 65 if (is_standard_system) { 66 external_deps += [ "hilog:libhilog" ] 67 } else { 68 external_deps += [ "hilog:libhilog" ] 69 } 70} 71