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/util" 19 20##############################fuzztest########################################## 21import("//foundation/arkui/ace_engine/ace_config.gni") 22ohos_fuzztest("UtilFuzzTest") { 23 module_out_path = module_output_path 24 fuzz_config_file = "//foundation/arkui/ace_engine/test/fuzztest/util_fuzzer" 25 include_dirs = [] 26 cflags = [ 27 "-g", 28 "-O0", 29 "-Wno-unused-variable", 30 "-fno-omit-frame-pointer", 31 ] 32 sources = [ 33 "$ace_root/adapter/ohos/osal/log_wrapper.cpp", 34 "$ace_root/frameworks/base/geometry/dimension.cpp", 35 "$ace_root/frameworks/base/json/json_util.cpp", 36 "$ace_root/frameworks/bridge/common/utils/source_map.cpp", 37 "//third_party/cJSON/cJSON.c", 38 "util_fuzzer.cpp", 39 ] 40 include_dirs = [ 41 "$ace_root/frameworks/base/utils", 42 "$ace_root/frameworks/base/json", 43 "$ace_root/frameworks/base/", 44 "$ace_root/frameworks", 45 "$ace_root", 46 cjson_root, 47 "$root_out_dir/arkui/framework", 48 ] 49 deps = [ "$ace_root/frameworks/base:ace_memory_monitor_ohos" ] 50 external_deps = [ 51 "c_utils:utils", 52 "hilog:libhilog", 53 ] 54 55 ldflags = [] 56 if (ace_engine_feature_enable_coverage) { 57 cflags += [ "--coverage" ] 58 ldflags += [ "--coverage" ] 59 } 60} 61 62############################################################################### 63group("fuzztest") { 64 testonly = true 65 deps = [] 66 deps += [ 67 # deps file 68 ":UtilFuzzTest", 69 ] 70} 71############################################################################### 72