# Copyright (c) 2023 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import("//build/test.gni") import("//foundation/multimedia/media_library/media_library.gni") ohos_fuzztest("openFileFuzzTest") { module_out_path = "media_library/medialibrary_openFile_test" fuzz_config_file = "../openFile_fuzzer" include_dirs = [ "./include", "../get_self_permissions/include", "../../../media_library_helper/include", "../../../../services/media_scanner/include/scanner", "../../../medialibrary_data_extension/include", "../../../../../interfaces/inner_api/media_library_helper/include", "../../../../../interfaces/innerkits/native/include", "../../../media_library_helper/include", "../../../../utils/include", "//third_party/json/include", ] cflags = [ "-g", "-O0", "-Wno-unused-variable", "-fno-omit-frame-pointer", ] sources = [ "../../../test/fuzztest/openFile_fuzzer/openFile_fuzzer.cpp" ] defines = [] deps = [ "../../../media_library_helper:media_library_packages", "../../../media_library_manager:media_library_manager", ] external_deps = [ "ability_base:want", "ability_base:zuri", "ability_runtime:ability_manager", "ability_runtime:abilitykit_native", "access_token:libaccesstoken_sdk", "access_token:libnativetoken", "access_token:libtoken_setproc", "c_utils:utils", "common_event_service:cesfwk_innerkits", "data_share:datashare_common", "data_share:datashare_consumer", "hilog:libhilog", "hitrace:hitrace_meter", "ipc:ipc_core", "relational_store:native_appdatafwk", "relational_store:native_rdb", "safwk:system_ability_fwk", "samgr:samgr_proxy", "user_file_service:file_access_extension_ability_kit", ] } group("fuzztest") { testonly = true deps = [ ":openFileFuzzTest" ] }