1# Copyright (C) 2021 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/media_library/media_library.gni") 16 17group("unittest") { 18 testonly = true 19 20 deps = [ ":mediascanner_unittest" ] 21} 22 23ohos_unittest("mediascanner_unittest") { 24 module_out_path = "media_library/mediascanner" 25 26 include_dirs = [ 27 "./include", 28 "../medialibrary_unittest_utils/include", 29 ] 30 31 sources = [ 32 "../medialibrary_unittest_utils/src/medialibrary_unittest_utils.cpp", 33 "./src/mediascanner_unit_test.cpp", 34 ] 35 36 deps = [ 37 "${MEDIALIB_INNERKITS_PATH}/media_library_helper:media_library", 38 "${MEDIALIB_INNERKITS_PATH}/medialibrary_data_extension:medialibrary_data_extension", 39 ] 40 41 external_deps = [ 42 "ability_base:configuration", 43 "ability_base:zuri", 44 "ability_runtime:ability_context_native", 45 "ability_runtime:ability_manager", 46 "ability_runtime:abilitykit_native", 47 "ability_runtime:app_context", 48 "ability_runtime:runtime", 49 "bundle_framework:appexecfwk_core", 50 "c_utils:utils", 51 "common_event_service:cesfwk_innerkits", 52 "data_share:datashare_common", 53 "data_share:datashare_provider", 54 "hilog:libhilog", 55 "image_framework:image_native", 56 "ipc:ipc_single", 57 "kv_store:distributeddata_inner", 58 "napi:ace_napi", 59 "player_framework:media_client", 60 "relational_store:native_rdb", 61 ] 62 63 sanitize = { 64 cfi = true 65 cfi_cross_dso = true 66 debug = false 67 } 68 69 if (is_standard_system) { 70 external_deps += [ "hilog:libhilog" ] 71 } else { 72 external_deps += [ "hilog:libhilog" ] 73 } 74} 75