1# Copyright (c) 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 14#####################hydra-fuzz################### 15import("//build/config/features.gni") 16import("//build/test.gni") 17import("//foundation/ability/ability_runtime/ability_runtime.gni") 18import("//foundation/arkui/ace_engine/ace_config.gni") 19module_output_path = "arkui/utilmost" 20 21##############################fuzztest########################################## 22import("//foundation/arkui/ace_engine/ace_config.gni") 23ohos_fuzztest("UtilMostFuzzTest") { 24 module_out_path = module_output_path 25 fuzz_config_file = 26 "//foundation/arkui/ace_engine/test/fuzztest/utilmost_fuzzer" 27 include_dirs = [] 28 cflags = [ 29 "-g", 30 "-O0", 31 "-Wno-unused-variable", 32 "-fno-omit-frame-pointer", 33 ] 34 sources = [ 35 "$ace_root/adapter/ohos/osal/log_wrapper.cpp", 36 "$ace_root/frameworks/base/geometry/dimension.cpp", 37 "$ace_root/frameworks/base/json/json_util.cpp", 38 "$ace_root/frameworks/bridge/common/dom/dom_type.cpp", 39 "$ace_root/frameworks/bridge/common/utils/utils.cpp", 40 "$ace_root/frameworks/bridge/js_frontend/engine/common/js_constants.cpp", 41 "$ace_root/frameworks/core/animation/anticipate_curve.cpp", 42 "$ace_root/frameworks/core/animation/cubic_curve.cpp", 43 "$ace_root/frameworks/core/animation/curves.cpp", 44 "$ace_root/frameworks/core/animation/spring_curve.cpp", 45 "$ace_root/frameworks/core/animation/spring_model.cpp", 46 "$ace_root/frameworks/core/components/common/properties/clip_path.cpp", 47 "$ace_root/frameworks/core/pipeline_ng/test/mock/mock_pipeline_base.cpp", 48 "//third_party/cJSON/cJSON.c", 49 "utilmost_fuzzer.cpp", 50 ] 51 include_dirs = [ 52 "$ace_root/frameworks/base/utils", 53 "$ace_root/frameworks/base/json", 54 "$ace_root/frameworks/base/", 55 "$ace_root/frameworks", 56 "$ace_root", 57 cjson_root, 58 "$root_out_dir/arkui/framework", 59 ] 60 defines = [ "FUZZTEST" ] 61 deps = [ 62 "$ace_root/frameworks/base:ace_memory_monitor_ohos", 63 "$ace_root/frameworks/core/components/theme:build_theme_code", 64 "//foundation/window/window_manager/utils:libwmutil", 65 "//foundation/window/window_manager/wm:libwm", 66 "//third_party/googletest:gmock_main", 67 "//third_party/icu/icu4c:shared_icui18n", 68 "//third_party/icu/icu4c:shared_icuuc", 69 ] 70 external_deps = [ 71 "ability_base:want", 72 "ability_runtime:ability_manager", 73 "bundle_framework:appexecfwk_base", 74 "c_utils:utils", 75 "eventhandler:libeventhandler", 76 "hilog:libhilog", 77 "input:libmmi-client", 78 "ipc:ipc_core", 79 "window_manager:libdm", 80 ] 81 82 ldflags = [] 83 if (ace_engine_feature_enable_coverage) { 84 cflags += [ "--coverage" ] 85 ldflags += [ "--coverage" ] 86 } 87} 88 89############################################################################### 90group("fuzztest") { 91 testonly = true 92 deps = [] 93 deps += [ 94 # deps file 95 ":UtilMostFuzzTest", 96 ] 97} 98############################################################################### 99