1# Copyright (c) 2025 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 17ohos_fuzztest("MediaLibraryCloudMediaJsonHelperFuzzTest") { 18 module_out_path = "media_library/media_library" 19 fuzz_config_file = "." 20 21 include_dirs = [ 22 "./include", 23 "${MEDIALIB_INNERKITS_PATH}/medialibrary_data_extension/include", 24 "${MEDIALIB_SERVICES_PATH}/inner_api/native/cloud_sync", 25 "${MEDIALIB_INTERFACES_PATH}/kits/js/include", 26 "${MEDIALIB_INNERKITS_PATH}/media_library_cloud_sync/include", 27 "${MEDIALIB_INNERKITS_PATH}/media_library_cloud_sync/include/cloud_sync_data_convert", 28 "${MEDIALIB_INTERFACES_PATH}/innerkits/native/include", 29 ] 30 31 sources = [ 32 "${MEDIALIB_JS_PATH}/src/userfile_client.cpp", 33 "./medialibrarycloudmediajsonhelper_fuzzer.cpp", 34 "${MEDIALIB_INNERKITS_PATH}/media_library_cloud_sync/src/cloud_sync_data_convert/cloud_data_convert_to_vo.cpp", 35 "${MEDIALIB_INNERKITS_PATH}/media_library_cloud_sync/src/cloud_sync_data_convert/cloud_album_data_convert.cpp", 36 "${MEDIALIB_INNERKITS_PATH}/media_library_cloud_sync/src/cloud_sync_data_convert/cloud_file_data_convert.cpp", 37 "${MEDIALIB_INNERKITS_PATH}/media_library_cloud_sync/src/mdk_record/mdk_record.cpp", 38 "${MEDIALIB_INNERKITS_PATH}/media_library_cloud_sync/src/mdk_record/mdk_record_field.cpp", 39 "${MEDIALIB_INNERKITS_PATH}/media_library_cloud_sync/src/mdk_record_album_data.cpp", 40 "${MEDIALIB_INNERKITS_PATH}/media_library_cloud_sync/src/mdk_record_photos_data.cpp", 41 "${MEDIALIB_INNERKITS_PATH}/media_library_cloud_sync/src/json_helper.cpp", 42 "${MEDIALIB_INNERKITS_PATH}/media_library_cloud_sync/src/mdk_record_reader.cpp", 43 ] 44 45 deps = [ 46 "${MEDIALIB_INNERKITS_PATH}/media_library_cloud_sync:media_library_cloud_sync", 47 "${MEDIALIB_INNERKITS_PATH}/media_library_helper:media_library", 48 "${MEDIALIB_INNERKITS_PATH}/medialibrary_data_extension:medialibrary_data_extension", 49 "${MEDIALIB_INTERFACES_PATH}/kits/js:medialibrary_nutils", 50 ] 51 52 external_deps = [ 53 "ability_base:configuration", 54 "ability_base:want", 55 "ability_base:zuri", 56 "ability_runtime:ability_context_native", 57 "ability_runtime:ability_manager", 58 "ability_runtime:napi_base_context", 59 "ability_runtime:abilitykit_native", 60 "ability_runtime:app_context", 61 "ability_runtime:app_manager", 62 "ability_runtime:dataobs_manager", 63 "ability_runtime:runtime", 64 "bundle_framework:appexecfwk_core", 65 "c_utils:utils", 66 "common_event_service:cesfwk_innerkits", 67 "data_share:datashare_common", 68 "data_share:datashare_consumer", 69 "data_share:datashare_provider", 70 "dfs_service:cloudsync_kit_inner", 71 "hilog:libhilog", 72 "hisysevent:libhisysevent", 73 "hitrace:hitrace_meter", 74 "image_framework:image_native", 75 "ipc:ipc_napi", 76 "ipc:ipc_single", 77 "jsoncpp:jsoncpp", 78 "kv_store:distributeddata_inner", 79 "napi:ace_napi", 80 "player_framework:media_client", 81 "relational_store:native_rdb", 82 "relational_store:rdb_data_share_adapter", 83 "access_token:libtokenid_sdk", 84 "dfs_service:cloudfile_kit", 85 ] 86}