• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2022-2023 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/test.gni")
15import("../../../displaymgr.gni")
16
17module_output_path = "${displaymgr_part_name}/displaymgr"
18
19##############################fuzztest##########################################
20ohos_fuzztest("DisplayFuzzTest") {
21  module_out_path = module_output_path
22  fuzz_config_file = "${displaymgr_root_path}/test/fuzztest/display_fuzzer"
23
24  include_dirs = [
25    "./",
26    "${displaymgr_root_path}/service/native/include",
27    "${displaymgr_root_path}/service/zidl/include",
28    "${displaymgr_inner_api}/native/include",
29  ]
30
31  configs = [
32    "${displaymgr_utils_path}:utils_config",
33    "${displaymgr_utils_path}:coverage_flags",
34  ]
35
36  cflags = [
37    "-g",
38    "-O0",
39    "-Wno-unused-variable",
40    "-fno-omit-frame-pointer",
41  ]
42  sources = [
43    "${displaymgr_root_path}/service/native/src/display_auto_brightness.cpp",
44    "${displaymgr_root_path}/service/native/src/display_param_helper.cpp",
45    "${displaymgr_root_path}/service/native/src/display_power_mgr_service.cpp",
46    "${displaymgr_root_path}/service/native/src/display_setting_helper.cpp",
47    "${displaymgr_root_path}/service/native/src/display_system_ability.cpp",
48    "${displaymgr_root_path}/service/native/src/gradual_animator.cpp",
49    "${displaymgr_root_path}/service/native/src/screen_action.cpp",
50    "${displaymgr_root_path}/service/native/src/screen_controller.cpp",
51    "${displaymgr_root_path}/service/zidl/src/display_power_callback_proxy.cpp",
52    "${displaymgr_root_path}/service/zidl/src/display_power_mgr_stub.cpp",
53    "./display_fuzzer.cpp",
54  ]
55
56  external_deps = [ "power_manager:power_permission" ]
57  external_deps += [
58    "ability_runtime:ability_manager",
59    "c_utils:utils",
60    "data_share:datashare_consumer",
61    "display_manager:displaymgr",
62    "eventhandler:libeventhandler",
63    "ffrt:libffrt",
64    "hicollie:libhicollie",
65    "hilog:libhilog",
66    "hisysevent:libhisysevent",
67    "image_framework:image_native",
68    "ipc:ipc_core",
69    "power_manager:power_ffrt",
70    "power_manager:power_setting",
71    "power_manager:power_sysparam",
72    "power_manager:powermgr_client",
73    "safwk:system_ability_fwk",
74    "sensor:sensor_interface_native",
75    "window_manager:libdm",
76  ]
77}
78
79###############################################################################
80group("fuzztest") {
81  testonly = true
82  deps = []
83
84  deps += [
85    # deps file
86    ":DisplayFuzzTest",
87  ]
88}
89###############################################################################
90