• 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/arkressched"
21
22##############################fuzztest##########################################
23ohos_fuzztest("ArkResschedFuzzTest") {
24  module_out_path = module_output_path
25  fuzz_config_file =
26      "//foundation/arkui/ace_engine/test/fuzztest/arkressched_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/adapter/ohos/osal/ressched_report.cpp",
37    "$ace_root/adapter/ohos/osal/system_properties.cpp",
38    "$ace_root/frameworks/base/json/json_util.cpp",
39    "$ace_root/frameworks/base/ressched/ressched_report.cpp",
40    "$ace_root/frameworks/core/common/test/mock/mock_ace_application_info.cpp",
41    "//third_party/cJSON/cJSON.c",
42    "arkressched_fuzzer.cpp",
43  ]
44  include_dirs = [
45    "$ace_root/frameworks/base/json",
46    "$ace_root/frameworks/base/ressched",
47    "$ace_root/frameworks/base/",
48    "$ace_root/frameworks",
49    "$ace_root",
50    cjson_root,
51  ]
52
53  defines = [ "FUZZTEST" ]
54
55  if (is_standard_system) {
56    external_deps = [
57      "hiviewdfx_hilog_native:libhilog",
58      "init:libbegetutil",
59    ]
60    #deps += [ "$ace_flutter_engine_root/icu:ace_libicu_ohos" ]
61  } else {
62    external_deps = [
63      "hilog:libhilog",
64      "init_lite:libbegetutil",
65    ]
66  }
67}
68
69###############################################################################
70group("fuzztest") {
71  testonly = true
72  deps = []
73  deps += [
74    # deps file
75    ":ArkResschedFuzzTest",
76  ]
77}
78###############################################################################
79