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") 18module_output_path = "arkui/utilengine" 19 20##############################fuzztest########################################## 21import("//foundation/arkui/ace_engine/ace_config.gni") 22ohos_fuzztest("UtilEngineFuzzTest") { 23 module_out_path = module_output_path 24 fuzz_config_file = 25 "//foundation/arkui/ace_engine/test/fuzztest/utilengine_fuzzer" 26 include_dirs = [] 27 cflags = [ 28 "-g", 29 "-O0", 30 "-Wno-unused-variable", 31 "-fno-omit-frame-pointer", 32 ] 33 sources = [ 34 "$ace_root/adapter/ohos/osal/log_wrapper.cpp", 35 "$ace_root/frameworks/base/geometry/dimension.cpp", 36 "$ace_root/frameworks/base/json/json_util.cpp", 37 "$ace_root/frameworks/base/log/dump_log.cpp", 38 "$ace_root/frameworks/base/subwindow/subwindow_manager.cpp", 39 "$ace_root/frameworks/core/common/test/mock/mock_container.cpp", 40 41 #"$ace_root/frameworks/base/utils/resource_configuration.cpp", 42 #"$ace_root/frameworks/base/utils/string_expression.cpp", 43 "$ace_root/frameworks/bridge/common/utils/engine_helper.cpp", 44 45 #"$ace_root/frameworks/bridge/common/utils/source_map.cpp", 46 "$ace_root/frameworks/bridge/js_frontend/engine/common/js_engine_loader.cpp", 47 "//third_party/cJSON/cJSON.c", 48 "utilengine_fuzzer.cpp", 49 ] 50 include_dirs = [ 51 "$ace_root/frameworks/base/utils", 52 "$ace_root/frameworks/base/json", 53 "$ace_root/frameworks/base/", 54 "$ace_root/frameworks", 55 "$ace_root", 56 cjson_root, 57 ] 58 59 deps = [ 60 #"$ace_root/adapter/ohos/osal:ace_osal_ohos", 61 "//foundation/window/window_manager/utils:libwmutil", 62 "//foundation/window/window_manager/wm:libwm", 63 "//third_party/icu/icu4c:shared_icui18n", 64 "//third_party/icu/icu4c:shared_icuuc", 65 ] 66 external_deps = [ 67 "ability_base:want", 68 "ability_runtime:ability_manager", 69 "bundle_framework:appexecfwk_base", 70 "c_utils:utils", 71 "eventhandler:libeventhandler", 72 "hiviewdfx_hilog_native:libhilog", 73 "input:libmmi-client", 74 "ipc:ipc_core", 75 "window_manager:libdm", 76 ] 77} 78 79############################################################################### 80group("fuzztest") { 81 testonly = true 82 deps = [] 83 deps += [ 84 # deps file 85 ":UtilEngineFuzzTest", 86 ] 87} 88############################################################################### 89