1# Copyright (C) 2021-2022 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 17module_output_path = "media_library/mediathumbnail" 18 19group("unittest") { 20 testonly = true 21 22 deps = [ ":mediathumbnail_test" ] 23} 24 25ohos_unittest("mediathumbnail_test") { 26 module_out_path = module_output_path 27 include_dirs = [ 28 "./include", 29 "../get_self_permissions/include", 30 "${MEDIA_LIB_BASE_DIR}/interfaces/innerkits/native/include", 31 "${MEDIA_LIB_COMMON_UTILS_DIR}/include", 32 "${MEDIA_LIB_INNERKITS_DIR}/media_library_helper/include", 33 "${MEDIA_LIB_SERVICES_DIR}/media_library/include", 34 "${MEDIA_LIB_SERVICES_DIR}/interfaces/inner_api/media_library_helper/include", 35 ] 36 37 sources = [ 38 "../get_self_permissions/src/get_self_permissions.cpp", 39 "./src/mediathumbnail_test.cpp", 40 "//foundation/multimedia/media_library/frameworks/innerkitsimpl/media_library_helper/src/media_thumbnail_helper.cpp", 41 ] 42 43 deps = [ 44 "$MEDIA_LIB_INNERKITS_DIR/media_library_helper:media_library", 45 "${MEDIA_LIB_INNERKITS_DIR}/medialibrary_data_extension:medialibrary_data_extension", 46 ] 47 48 external_deps = [ 49 "ability_base:want", 50 "ability_base:zuri", 51 "ability_runtime:abilitykit_native", 52 "access_token:libaccesstoken_sdk", 53 "access_token:libnativetoken", 54 "access_token:libtoken_setproc", 55 "c_utils:utils", 56 "data_share:datashare_common", 57 "data_share:datashare_consumer", 58 "hitrace_native:hitrace_meter", 59 "hiviewdfx_hilog_native:libhilog", 60 "ipc:ipc_core", 61 "multimedia_image_framework:image_native", 62 "relational_store:native_appdatafwk", 63 "relational_store:native_rdb", 64 "samgr:samgr_proxy", 65 ] 66 67 resource_config_file = 68 "${MEDIA_LIB_INNERKITS_DIR}/test/unittest/resources/ohos_test.xml" 69} 70