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/ohos.gni") 15import("//build/test.gni") 16import("//foundation/multimedia/media_library/media_library.gni") 17 18ohos_fuzztest("MediaLibraryMtpFuzzTest") { 19 module_out_path = "media_library/media_library" 20 fuzz_config_file = "." 21 22 include_dirs = [ 23 "./", 24 "${MEDIALIB_INNERKITS_PATH}/medialibrary_data_extension/include", 25 "${MEDIALIB_SERVICES_PATH}/media_mtp/include", 26 "${MEDIALIB_SERVICES_PATH}/media_mtp/include/payload_data", 27 ] 28 29 cflags = [ "-fno-access-control" ] 30 31 sources = [ "./medialibrary_mtp_fuzzer.cpp" ] 32 33 deps = [ 34 "${MEDIALIB_INNERKITS_PATH}/media_library_helper:media_library", 35 "${MEDIALIB_INNERKITS_PATH}/medialibrary_data_extension:medialibrary_data_extension", 36 "${MEDIALIB_MTP_PATH}:media_mtp", 37 ] 38 39 external_deps = [ 40 "ability_base:base", 41 "ability_base:configuration", 42 "ability_base:want", 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:app_manager", 49 "ability_runtime:dataobs_manager", 50 "ability_runtime:extensionkit_native", 51 "ability_runtime:runtime", 52 "ability_runtime:uri_permission_mgr", 53 "c_utils:utils", 54 "common_event_service:cesfwk_innerkits", 55 "data_share:datashare_common", 56 "data_share:datashare_consumer", 57 "drivers_interface_usb:usbfn_mtp_idl_headers", 58 "hilog:libhilog", 59 "hitrace:hitrace_meter", 60 "image_framework:image_native", 61 "init:libbegetutil", 62 "ipc:ipc_core", 63 "player_framework:media_client", 64 "relational_store:native_rdb", 65 "safwk:system_ability_fwk", 66 "samgr:samgr_proxy", 67 "storage_service:storage_manager_sa_proxy", 68 ] 69} 70