# Copyright (c) 2022-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/config/features.gni") import("//build/test.gni") #####################hydra-fuzz################### import("//foundation/arkui/ace_engine/ace_config.gni") module_output_path = "ace_engine/ace_engine/imageloader" ##############################fuzztest########################################## ohos_fuzztest("ImageLoaderFuzzTest") { module_out_path = module_output_path fuzz_config_file = "//foundation/arkui/ace_engine/test/fuzztest/imageloader_fuzzer" deps = [ "$ace_root/frameworks/base:ace_memory_monitor_ohos", "$ace_root/frameworks/base/resource:ace_resource", "$ace_root/frameworks/core/components/theme:build_theme_code", "$ace_root/test/unittest:ace_engine_unittest_flutter_deps", "$ace_root/test/unittest:ace_unittest_log", "$ace_root/test/unittest:ace_unittest_trace", "$cjson_root:cjson", "//third_party/googletest:gmock", "//third_party/googletest:gmock_main", ] sources = [ "$ace_root/frameworks/core/common/container_scope.cpp", "$ace_root/frameworks/core/image/image_cache.cpp", "$ace_root/frameworks/core/image/image_compressor.cpp", "$ace_root/frameworks/core/image/image_file_cache.cpp", "$ace_root/frameworks/core/image/image_loader.cpp", "$ace_root/frameworks/core/image/image_object.cpp", "$ace_root/frameworks/core/image/image_provider.cpp", "$ace_root/frameworks/core/image/image_source_info.cpp", "$ace_root/test/mock/base/mock_background_task_executor.cpp", "$ace_root/test/mock/base/mock_download_manager.cpp", "$ace_root/test/mock/core/common/mock_ace_application_info.cpp", "imageloader_fuzzer.cpp", ] if (is_asan) { sources += [ "$ace_root/frameworks/base/json/json_util.cpp", "$ace_root/frameworks/base/log/ace_tracker.cpp", "$ace_root/frameworks/core/common/ace_engine.cpp", "$ace_root/frameworks/core/common/container.cpp", "$ace_root/frameworks/core/common/resource/resource_manager.cpp", "$ace_root/frameworks/core/components/common/properties/color.cpp", "$ace_root/frameworks/core/components_ng/image_provider/adapter/skia_image_data.cpp", "$ace_root/frameworks/core/pipeline/pipeline_base.cpp", "$ace_root/test/mock/adapter/mock_file_uri_helper_ohos.cpp", "$ace_root/test/mock/base/mock_event_report.cpp", "$ace_root/test/mock/core/common/mock_resource_adapter_v2.cpp", "$ace_root/test/mock/core/common/mock_theme_constants.cpp", "$ace_root/test/mock/core/common/mock_watch_dog.cpp", "$ace_root/test/mock/core/render/mock_canvas_image.cpp", "$ace_root/test/mock/core/render/mock_skia_image.cpp", "$ace_root/test/mock/interfaces/mock_ace_forward_compatibility.cpp", "$ace_root/test/unittest/core/pipeline/mock_event_manager.cpp", ] } configs = [ "$ace_root/test/fuzztest:ace_fuzz_config" ] if (ace_use_rosen_drawing) { include_dirs = [ "//foundation/graphic/graphic_2d/rosen/modules/2d_engine", "//foundation/graphic/graphic_2d/rosen/modules/2d_engine/rosen_text", ] external_deps = [ "graphic_2d:2d_graphics" ] } } ############################################################################### group("fuzztest") { testonly = true deps = [] if (!is_asan) { deps += [ ":ImageLoaderFuzzTest" ] } } ###############################################################################