• 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("//base/theme/wallpaper_mgr/wallpaper.gni")
15
16#####################hydra-fuzz###################
17import("//build/config/features.gni")
18import("//build/ohos.gni")
19import("//build/test.gni")
20
21##############################fuzztest##########################################
22ohos_fuzztest("WallpaperManagerFuzzTest") {
23  module_out_path = "theme/wallpaper"
24
25  fuzz_config_file =
26      "//base/theme/wallpaper_mgr/test/fuzztest/wallpapermanager_fuzzer"
27
28  include_dirs = [
29    "//base/theme/wallpaper_mgr/services/include",
30    "//base/security/access_token/interfaces/innerkits/accesstoken/include",
31    "//base/theme/wallpaper_mgr/frameworks/innerkitsimpl/wallpaper_manager/include",
32    "//base/theme/wallpaper_mgr/utils/include",
33    "//foundation/window/window_manager/interfaces/innerkits/dm",
34    "//foundation/systemabilitymgr/safwk/interfaces/innerkits/safwk",
35  ]
36
37  cflags = [
38    "-g",
39    "-O0",
40    "-Wno-unused-variable",
41    "-fno-omit-frame-pointer",
42  ]
43
44  sources = [ "wallpaper_manager_fuzzer.cpp" ]
45
46  deps = [
47    "${ability_runtime_path}/frameworks/native/ability/native:abilitykit_native",
48    "${ability_runtime_services_path}/abilitymgr:abilityms",
49    "${utils_path}:wallpaper_utils",
50    "//base/security/access_token/interfaces/innerkits/token_setproc:libtoken_setproc",
51    "//base/theme/wallpaper_mgr/frameworks/innerkitsimpl/wallpaper_manager:wallpapermanager",
52    "//base/theme/wallpaper_mgr/services:wallpaper_service",
53    "//foundation/window/window_manager/utils:libwmutil",
54    "//foundation/window/window_manager/wm:libwm",
55  ]
56
57  external_deps = [
58    "access_token:libaccesstoken_sdk",
59    "access_token:libnativetoken",
60    "graphic_standard:surface",
61    "hiviewdfx_hilog_native:libhilog",
62    "ipc:ipc_core",
63    "os_account:os_account_innerkits",
64  ]
65}
66
67###############################################################################
68group("fuzztest") {
69  testonly = true
70  deps = []
71  deps += [
72    # deps file
73    ":WallpaperManagerFuzzTest",
74  ]
75}
76###############################################################################
77