# Copyright (C) 2021 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/media_library/media_library.gni") group("unittest") { testonly = true deps = [ ":mediascanner_unittest" ] } ohos_unittest("mediascanner_unittest") { module_out_path = "media_library/mediascanner" include_dirs = [ "./include", "../medialibrary_unittest_utils/include", ] sources = [ "../medialibrary_unittest_utils/src/medialibrary_unittest_utils.cpp", "./src/mediascanner_unit_test.cpp", ] deps = [ "${MEDIALIB_INNERKITS_PATH}/media_library_helper:media_library", "${MEDIALIB_INNERKITS_PATH}/medialibrary_data_extension:medialibrary_data_extension", ] external_deps = [ "ability_base:configuration", "ability_base:zuri", "ability_runtime:ability_context_native", "ability_runtime:ability_manager", "ability_runtime:abilitykit_native", "ability_runtime:app_context", "ability_runtime:runtime", "bundle_framework:appexecfwk_core", "c_utils:utils", "common_event_service:cesfwk_innerkits", "data_share:datashare_common", "data_share:datashare_provider", "hilog:libhilog", "image_framework:image_native", "ipc:ipc_single", "kv_store:distributeddata_inner", "napi:ace_napi", "player_framework:media_client", "relational_store:native_rdb", ] sanitize = { cfi = true cfi_cross_dso = true debug = false } if (is_standard_system) { external_deps += [ "hilog:libhilog" ] } else { external_deps += [ "hilog:libhilog" ] } }