• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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/base/log/dump_log.cpp",
37    "$ace_root/frameworks/bridge/common/utils/source_map.cpp",
38    "//third_party/cJSON/cJSON.c",
39    "util_fuzzer.cpp",
40  ]
41  include_dirs = [
42    "$ace_root/frameworks/base/utils",
43    "$ace_root/frameworks/base/json",
44    "$ace_root/frameworks/base/",
45    "$ace_root/frameworks",
46    "$ace_root",
47    cjson_root,
48  ]
49  external_deps = [
50    "c_utils:utils",
51    "hiviewdfx_hilog_native:libhilog",
52  ]
53}
54
55###############################################################################
56group("fuzztest") {
57  testonly = true
58  deps = []
59  deps += [
60    # deps file
61    ":UtilFuzzTest",
62  ]
63}
64###############################################################################
65