• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2024 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")
17module_output_path = "graphic_2d/graphic_2d"
18
19##############################fuzztest##########################################
20ohos_fuzztest("RSStubFuzzTest") {
21  module_out_path = module_output_path
22  fuzz_config_file = "../../../..//render/render/fuzztest/rsstub_fuzzer"
23  include_dirs = [
24    "../../../../../rosen/modules/platform/ipc_core",
25    "../../../../../rosen/modules/platform",
26    "../../../../../modules/hyper_graphic_manager/core/config",
27    "../../../../../modules/render_service/core",
28    "../../../../../modules/render_service_base/src",
29    "../../../../../test/include",
30  ]
31  deps = [
32    "../../../../../modules/2d_graphics:2d_graphics",
33    "../../../../../modules/composer:libcomposer",
34    "../../../../../modules/render_service:librender_service",
35    "../../../../../modules/render_service_base:librender_service_base",
36    "../../../../../modules/render_service_client:librender_service_client",
37  ]
38
39  cflags = [
40    "-g",
41    "-O0",
42    "-Wno-unused-variable",
43    "-fno-omit-frame-pointer",
44    "-Dprivate=public",
45    "-Dprotected=public",
46  ]
47
48  sources = [ "rsstub_fuzzer.cpp" ]
49
50  external_deps = [
51    "ability_base:base",
52    "ability_base:want",
53    "ability_runtime:abilitykit_native",
54    "ability_runtime:app_manager",
55    "c_utils:utils",
56    "common_event_service:cesfwk_core",
57    "common_event_service:cesfwk_innerkits",
58    "hilog:libhilog",
59    "ipc:ipc_core",
60    "safwk:system_ability_fwk",
61    "samgr:samgr_proxy",
62  ]
63
64  if (defined(global_parts_info) && defined(global_parts_info.sensors_sensor)) {
65    external_deps += [ "sensor:sensor_interface_native" ]
66  }
67}
68
69###############################################################################
70group("fuzztest") {
71  testonly = true
72  deps = []
73  deps += [
74    # deps file
75    ":RSStubFuzzTest",
76  ]
77}
78###############################################################################
79