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_ciohos_executable("ringtone_scanner_test") { 183e5483f6Sopenharmony_ci install_enable = true 193e5483f6Sopenharmony_ci 203e5483f6Sopenharmony_ci include_dirs = [] 213e5483f6Sopenharmony_ci sources = [ "./src/ringtone_scan_test.cpp" ] 223e5483f6Sopenharmony_ci deps = [] 233e5483f6Sopenharmony_ci defines = [] 243e5483f6Sopenharmony_ci 253e5483f6Sopenharmony_ci if (build_variant == "root") { 263e5483f6Sopenharmony_ci include_dirs += [ 273e5483f6Sopenharmony_ci "./include", 283e5483f6Sopenharmony_ci "../get_self_permissions/include", 293e5483f6Sopenharmony_ci "${RINGTONE_SERVICES_PATH}/utils/include", 303e5483f6Sopenharmony_ci "${RINGTONE_INTERFACES_PATH}/inner_api/native", 313e5483f6Sopenharmony_ci ] 323e5483f6Sopenharmony_ci 333e5483f6Sopenharmony_ci sources += [ "../get_self_permissions/src/get_self_permissions.cpp" ] 343e5483f6Sopenharmony_ci deps += [ 353e5483f6Sopenharmony_ci "${RINGTONE_ROOT_PATH}/services/ringtone_helper:ringtone_data_helper", 363e5483f6Sopenharmony_ci ] 373e5483f6Sopenharmony_ci 383e5483f6Sopenharmony_ci external_deps = [ 393e5483f6Sopenharmony_ci "ability_base:zuri", 403e5483f6Sopenharmony_ci "ability_runtime:abilitykit_native", 413e5483f6Sopenharmony_ci "access_token:libaccesstoken_sdk", 423e5483f6Sopenharmony_ci "access_token:libnativetoken", 433e5483f6Sopenharmony_ci "access_token:libtoken_setproc", 443e5483f6Sopenharmony_ci "c_utils:utils", 453e5483f6Sopenharmony_ci "common_event_service:cesfwk_innerkits", 463e5483f6Sopenharmony_ci "data_share:datashare_consumer", 473e5483f6Sopenharmony_ci "hilog:libhilog", 483e5483f6Sopenharmony_ci "hitrace:hitrace_meter", 493e5483f6Sopenharmony_ci "ipc:ipc_single", 503e5483f6Sopenharmony_ci "relational_store:native_appdatafwk", 513e5483f6Sopenharmony_ci "samgr:samgr_proxy", 523e5483f6Sopenharmony_ci ] 533e5483f6Sopenharmony_ci 543e5483f6Sopenharmony_ci ldflags = [ "-Wl,--gc-sections" ] 553e5483f6Sopenharmony_ci 563e5483f6Sopenharmony_ci cflags = [ 573e5483f6Sopenharmony_ci "-fdata-sections", 583e5483f6Sopenharmony_ci "-ffunction-sections", 593e5483f6Sopenharmony_ci "-Os", 603e5483f6Sopenharmony_ci ] 613e5483f6Sopenharmony_ci 623e5483f6Sopenharmony_ci cflags_cc = [ "-Os" ] 633e5483f6Sopenharmony_ci } 643e5483f6Sopenharmony_ci sanitize = { 653e5483f6Sopenharmony_ci cfi = true 663e5483f6Sopenharmony_ci cfi_cross_dso = true 673e5483f6Sopenharmony_ci debug = false 683e5483f6Sopenharmony_ci } 693e5483f6Sopenharmony_ci 703e5483f6Sopenharmony_ci subsystem_name = "multimedia" 713e5483f6Sopenharmony_ci part_name = "ringtone_library" 723e5483f6Sopenharmony_ci} 733e5483f6Sopenharmony_ci 743e5483f6Sopenharmony_ciohos_executable("ringtone_test") { 753e5483f6Sopenharmony_ci install_enable = true 763e5483f6Sopenharmony_ci 773e5483f6Sopenharmony_ci include_dirs = [] 783e5483f6Sopenharmony_ci sources = [ "./src/ringtone_test.cpp" ] 793e5483f6Sopenharmony_ci deps = [] 803e5483f6Sopenharmony_ci defines = [] 813e5483f6Sopenharmony_ci 823e5483f6Sopenharmony_ci if (build_variant == "root") { 833e5483f6Sopenharmony_ci include_dirs += [ 843e5483f6Sopenharmony_ci "./include", 853e5483f6Sopenharmony_ci "../get_self_permissions/include", 863e5483f6Sopenharmony_ci "${RINGTONE_SERVICES_PATH}/utils/include", 873e5483f6Sopenharmony_ci "${RINGTONE_INTERFACES_PATH}/inner_api/native", 883e5483f6Sopenharmony_ci ] 893e5483f6Sopenharmony_ci 903e5483f6Sopenharmony_ci sources += [ "../get_self_permissions/src/get_self_permissions.cpp" ] 913e5483f6Sopenharmony_ci deps += [ 923e5483f6Sopenharmony_ci "${RINGTONE_ROOT_PATH}/services/ringtone_helper:ringtone_data_helper", 933e5483f6Sopenharmony_ci ] 943e5483f6Sopenharmony_ci 953e5483f6Sopenharmony_ci external_deps = [ 963e5483f6Sopenharmony_ci "ability_base:zuri", 973e5483f6Sopenharmony_ci "ability_runtime:abilitykit_native", 983e5483f6Sopenharmony_ci "access_token:libaccesstoken_sdk", 993e5483f6Sopenharmony_ci "access_token:libnativetoken", 1003e5483f6Sopenharmony_ci "access_token:libtoken_setproc", 1013e5483f6Sopenharmony_ci "c_utils:utils", 1023e5483f6Sopenharmony_ci "common_event_service:cesfwk_innerkits", 1033e5483f6Sopenharmony_ci "data_share:datashare_consumer", 1043e5483f6Sopenharmony_ci "hilog:libhilog", 1053e5483f6Sopenharmony_ci "hitrace:hitrace_meter", 1063e5483f6Sopenharmony_ci "ipc:ipc_single", 1073e5483f6Sopenharmony_ci "relational_store:native_appdatafwk", 1083e5483f6Sopenharmony_ci "samgr:samgr_proxy", 1093e5483f6Sopenharmony_ci ] 1103e5483f6Sopenharmony_ci 1113e5483f6Sopenharmony_ci ldflags = [ "-Wl,--gc-sections" ] 1123e5483f6Sopenharmony_ci 1133e5483f6Sopenharmony_ci cflags = [ 1143e5483f6Sopenharmony_ci "-fdata-sections", 1153e5483f6Sopenharmony_ci "-ffunction-sections", 1163e5483f6Sopenharmony_ci "-Os", 1173e5483f6Sopenharmony_ci ] 1183e5483f6Sopenharmony_ci 1193e5483f6Sopenharmony_ci cflags_cc = [ "-Os" ] 1203e5483f6Sopenharmony_ci } 1213e5483f6Sopenharmony_ci sanitize = { 1223e5483f6Sopenharmony_ci cfi = true 1233e5483f6Sopenharmony_ci cfi_cross_dso = true 1243e5483f6Sopenharmony_ci debug = false 1253e5483f6Sopenharmony_ci } 1263e5483f6Sopenharmony_ci 1273e5483f6Sopenharmony_ci subsystem_name = "multimedia" 1283e5483f6Sopenharmony_ci part_name = "ringtone_library" 1293e5483f6Sopenharmony_ci} 1303e5483f6Sopenharmony_ci 1313e5483f6Sopenharmony_ciohos_executable("ringtone_read_test") { 1323e5483f6Sopenharmony_ci install_enable = true 1333e5483f6Sopenharmony_ci 1343e5483f6Sopenharmony_ci include_dirs = [] 1353e5483f6Sopenharmony_ci sources = [ "./src/ringtone_read_test.cpp" ] 1363e5483f6Sopenharmony_ci deps = [] 1373e5483f6Sopenharmony_ci defines = [] 1383e5483f6Sopenharmony_ci 1393e5483f6Sopenharmony_ci if (build_variant == "root") { 1403e5483f6Sopenharmony_ci include_dirs += [ 1413e5483f6Sopenharmony_ci "./include", 1423e5483f6Sopenharmony_ci "../get_self_permissions/include", 1433e5483f6Sopenharmony_ci "${RINGTONE_SERVICES_PATH}/utils/include", 1443e5483f6Sopenharmony_ci "${RINGTONE_INTERFACES_PATH}/inner_api/native", 1453e5483f6Sopenharmony_ci ] 1463e5483f6Sopenharmony_ci 1473e5483f6Sopenharmony_ci sources += [ "../get_self_permissions/src/get_self_permissions.cpp" ] 1483e5483f6Sopenharmony_ci deps += [ 1493e5483f6Sopenharmony_ci "${RINGTONE_ROOT_PATH}/services/ringtone_helper:ringtone_data_helper", 1503e5483f6Sopenharmony_ci ] 1513e5483f6Sopenharmony_ci 1523e5483f6Sopenharmony_ci external_deps = [ 1533e5483f6Sopenharmony_ci "ability_base:zuri", 1543e5483f6Sopenharmony_ci "ability_runtime:abilitykit_native", 1553e5483f6Sopenharmony_ci "access_token:libaccesstoken_sdk", 1563e5483f6Sopenharmony_ci "access_token:libnativetoken", 1573e5483f6Sopenharmony_ci "access_token:libtoken_setproc", 1583e5483f6Sopenharmony_ci "c_utils:utils", 1593e5483f6Sopenharmony_ci "common_event_service:cesfwk_innerkits", 1603e5483f6Sopenharmony_ci "data_share:datashare_consumer", 1613e5483f6Sopenharmony_ci "hilog:libhilog", 1623e5483f6Sopenharmony_ci "hitrace:hitrace_meter", 1633e5483f6Sopenharmony_ci "ipc:ipc_single", 1643e5483f6Sopenharmony_ci "relational_store:native_appdatafwk", 1653e5483f6Sopenharmony_ci "samgr:samgr_proxy", 1663e5483f6Sopenharmony_ci ] 1673e5483f6Sopenharmony_ci 1683e5483f6Sopenharmony_ci ldflags = [ "-Wl,--gc-sections" ] 1693e5483f6Sopenharmony_ci 1703e5483f6Sopenharmony_ci cflags = [ 1713e5483f6Sopenharmony_ci "-fdata-sections", 1723e5483f6Sopenharmony_ci "-ffunction-sections", 1733e5483f6Sopenharmony_ci "-Os", 1743e5483f6Sopenharmony_ci ] 1753e5483f6Sopenharmony_ci 1763e5483f6Sopenharmony_ci cflags_cc = [ "-Os" ] 1773e5483f6Sopenharmony_ci } 1783e5483f6Sopenharmony_ci sanitize = { 1793e5483f6Sopenharmony_ci cfi = true 1803e5483f6Sopenharmony_ci cfi_cross_dso = true 1813e5483f6Sopenharmony_ci debug = false 1823e5483f6Sopenharmony_ci } 1833e5483f6Sopenharmony_ci 1843e5483f6Sopenharmony_ci subsystem_name = "multimedia" 1853e5483f6Sopenharmony_ci part_name = "ringtone_library" 1863e5483f6Sopenharmony_ci} 187