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 "c_utils:utils", 50 "common_event_service:cesfwk_innerkits", 51 "data_share:datashare_common", 52 "data_share:datashare_provider", 53 "hilog:libhilog", 54 "image_framework:image_native", 55 "ipc:ipc_single", 56 "kv_store:distributeddata_inner", 57 "napi:ace_napi", 58 "player_framework:media_client", 59 "relational_store:native_rdb", 60 ] 61 62 if (is_standard_system) { 63 external_deps += [ "hilog:libhilog" ] 64 } else { 65 external_deps += [ "hilog:libhilog" ] 66 } 67} 68