• 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")
18import("//foundation/arkui/ace_engine/ace_config.gni")
19module_output_path = "ace_engine/ace_engine/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/common/container_scope.cpp",
47    "$ace_root/frameworks/core/components/common/properties/clip_path.cpp",
48    "$ace_root/test/mock/core/pipeline/mock_pipeline_context.cpp",
49    "//third_party/cJSON/cJSON.c",
50    "utilmost_fuzzer.cpp",
51  ]
52  include_dirs = [
53    "$ace_root/frameworks/base/utils",
54    "$ace_root/frameworks/base/json",
55    "$ace_root/frameworks/base/",
56    "$ace_root/frameworks",
57    "$ace_root",
58    cjson_root,
59    "$root_out_dir/arkui/framework",
60  ]
61  defines = [ "FUZZTEST" ]
62  deps = [
63    "$ace_root/frameworks/base:ace_memory_monitor_ohos",
64    "$ace_root/frameworks/core/components/theme:build_theme_code",
65    "//foundation/window/window_manager/utils:libwmutil",
66    "//foundation/window/window_manager/wm:libwm",
67    "//third_party/googletest:gmock_main",
68    "//third_party/icu/icu4c:shared_icui18n",
69    "//third_party/icu/icu4c:shared_icuuc",
70  ]
71  external_deps = [
72    "ability_base:want",
73    "ability_runtime:ability_manager",
74    "bundle_framework:appexecfwk_base",
75    "c_utils:utils",
76    "eventhandler:libeventhandler",
77    "hilog:libhilog",
78    "input:libmmi-client",
79    "ipc:ipc_core",
80    "window_manager:libdm",
81  ]
82
83  ldflags = []
84  if (ace_engine_feature_enable_coverage) {
85    cflags += [ "--coverage" ]
86    ldflags += [ "--coverage" ]
87  }
88}
89
90###############################################################################
91group("fuzztest") {
92  testonly = true
93  deps = []
94  deps += [
95    # deps file
96    ":UtilMostFuzzTest",
97  ]
98}
99###############################################################################
100