# 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") ohos_executable("ringtone_scanner_test") { install_enable = true include_dirs = [] sources = [ "./src/ringtone_scan_test.cpp" ] deps = [] defines = [] if (build_variant == "root") { include_dirs += [ "./include", "../get_self_permissions/include", "${RINGTONE_SERVICES_PATH}/utils/include", "${RINGTONE_INTERFACES_PATH}/inner_api/native", "${RINGTONE_HELPER_PATH}/include", ] sources += [ "../get_self_permissions/src/get_self_permissions.cpp" ] deps += [ "${RINGTONE_ROOT_PATH}/services/ringtone_helper:ringtone_data_helper", ] external_deps = [ "ability_base:zuri", "ability_runtime:abilitykit_native", "access_token:libaccesstoken_sdk", "access_token:libnativetoken", "access_token:libtoken_setproc", "c_utils:utils", "common_event_service:cesfwk_innerkits", "data_share:datashare_consumer", "hilog:libhilog", "hitrace:hitrace_meter", "ipc:ipc_single", "relational_store:native_appdatafwk", "samgr:samgr_proxy", ] ldflags = [ "-Wl,--gc-sections" ] cflags = [ "-fdata-sections", "-ffunction-sections", "-Os", ] cflags_cc = [ "-Os" ] } sanitize = { cfi = true cfi_cross_dso = true debug = false } subsystem_name = "multimedia" part_name = "ringtone_library" } ohos_executable("ringtone_test") { install_enable = true include_dirs = [] sources = [ "./src/ringtone_test.cpp" ] deps = [] defines = [] if (build_variant == "root") { include_dirs += [ "./include", "../get_self_permissions/include", "${RINGTONE_SERVICES_PATH}/utils/include", "${RINGTONE_INTERFACES_PATH}/inner_api/native", "${RINGTONE_HELPER_PATH}/include", ] sources += [ "../get_self_permissions/src/get_self_permissions.cpp" ] deps += [ "${RINGTONE_ROOT_PATH}/services/ringtone_helper:ringtone_data_helper", ] external_deps = [ "ability_base:zuri", "ability_runtime:abilitykit_native", "access_token:libaccesstoken_sdk", "access_token:libnativetoken", "access_token:libtoken_setproc", "c_utils:utils", "common_event_service:cesfwk_innerkits", "data_share:datashare_consumer", "hilog:libhilog", "hitrace:hitrace_meter", "ipc:ipc_single", "relational_store:native_appdatafwk", "samgr:samgr_proxy", ] ldflags = [ "-Wl,--gc-sections" ] cflags = [ "-fdata-sections", "-ffunction-sections", "-Os", ] cflags_cc = [ "-Os" ] } sanitize = { cfi = true cfi_cross_dso = true debug = false } subsystem_name = "multimedia" part_name = "ringtone_library" } ohos_executable("ringtone_read_test") { install_enable = true include_dirs = [] sources = [ "./src/ringtone_read_test.cpp" ] deps = [] defines = [] if (build_variant == "root") { include_dirs += [ "./include", "../get_self_permissions/include", "${RINGTONE_SERVICES_PATH}/utils/include", "${RINGTONE_INTERFACES_PATH}/inner_api/native", "${RINGTONE_HELPER_PATH}/include", ] sources += [ "../get_self_permissions/src/get_self_permissions.cpp" ] deps += [ "${RINGTONE_ROOT_PATH}/services/ringtone_helper:ringtone_data_helper", ] external_deps = [ "ability_base:zuri", "ability_runtime:abilitykit_native", "access_token:libaccesstoken_sdk", "access_token:libnativetoken", "access_token:libtoken_setproc", "c_utils:utils", "common_event_service:cesfwk_innerkits", "data_share:datashare_consumer", "hilog:libhilog", "hitrace:hitrace_meter", "ipc:ipc_single", "relational_store:native_appdatafwk", "samgr:samgr_proxy", ] ldflags = [ "-Wl,--gc-sections" ] cflags = [ "-fdata-sections", "-ffunction-sections", "-Os", ] cflags_cc = [ "-Os" ] } sanitize = { cfi = true cfi_cross_dso = true debug = false } subsystem_name = "multimedia" part_name = "ringtone_library" }