• 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
14import("//build/config/features.gni")
15import("//build/test.gni")
16import("//foundation/ability/ability_runtime/ability_runtime.gni")
17
18#####################hydra-fuzz###################
19import("//foundation/arkui/ace_engine/ace_config.gni")
20module_output_path = "arkui/res"
21
22##############################fuzztest##########################################
23ohos_fuzztest("ResFuzzTest") {
24  module_out_path = module_output_path
25  fuzz_config_file = "//foundation/arkui/ace_engine/test/fuzztest/res_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/frameworks/base/json/json_util.cpp",
35    "//third_party/cJSON/cJSON.c",
36    "res_fuzzer.cpp",
37  ]
38  include_dirs = [
39    "$ace_root/frameworks/base/json",
40    "$ace_root/frameworks/base/",
41    "$ace_root/frameworks",
42    "$ace_root",
43    "$root_out_dir/arkui/framework",
44    cjson_root,
45  ]
46
47  deps = [
48    "//foundation/arkui/ace_engine/interfaces/inner_api/ui_service_manager:ui_service_mgr",
49    "//foundation/systemabilitymgr/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy",
50    "//foundation/window/window_manager/utils:libwmutil",
51    "//foundation/window/window_manager/wm:libwm",
52    "//third_party/icu/icu4c:shared_icui18n",
53    "//third_party/icu/icu4c:shared_icuuc",
54  ]
55  external_deps = [
56    "ability_base:want",
57    "ability_runtime:ability_manager",
58    "bundle_framework:appexecfwk_base",
59    "c_utils:utils",
60    "eventhandler:libeventhandler",
61    "hilog:libhilog",
62    "input:libmmi-client",
63    "ipc:ipc_core",
64    "window_manager:libdm",
65  ]
66
67  ldflags = []
68  if (ace_engine_feature_enable_coverage) {
69    cflags += [ "--coverage" ]
70    ldflags += [ "--coverage" ]
71  }
72}
73
74###############################################################################
75group("fuzztest") {
76  testonly = true
77  deps = []
78  deps += [
79    # deps file
80    ":ResFuzzTest",
81  ]
82}
83###############################################################################
84