• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2022-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")
17import("//foundation/distributedhardware/device_manager/device_manager.gni")
18##############################fuzztest##########################################
19ohos_fuzztest("PinAuthFuzzTest") {
20  module_out_path = fuzz_test_output_path
21  fuzz_config_file = "${devicemanager_path}/test/commonfuzztest/pinauth_fuzzer"
22
23  include_dirs = [
24    "${ext_path}/pin_auth/include",
25    "${ext_path}/pin_auth/include/standard",
26    "${common_path}/include",
27    "${ext_path}/pin_auth/include/ability",
28    "${servicesimpl_path}/include/dependency/timer",
29    "${servicesimpl_path}/include/config",
30    "${servicesimpl_path}/include/adapter",
31    "${servicesimpl_path}/include/authentication",
32    "${servicesimpl_path}/include/authentication/showconfirm/standard",
33    "${servicesimpl_path}/include/ability",
34    "${servicesimpl_path}/include/devicestate",
35    "${servicesimpl_path}/include/discovery",
36    "${servicesimpl_path}/include/dependency/commonevent",
37    "${servicesimpl_path}/include/dependency/hichain",
38    "${servicesimpl_path}/include/dependency/softbus",
39    "${services_path}/include/",
40    "${services_path}/include/ipc",
41    "${services_path}/include/ipc/standard",
42    "${utils_path}/include",
43    "${utils_path}/include/ipc/standard",
44    "${servicesimpl_path}/include",
45    "${innerkits_path}/native_cpp/include",
46    "${common_path}/include/ipc",
47    "${common_path}/include/ipc/model",
48    "${innerkits_path}/native_cpp/include",
49    "${innerkits_path}/native_cpp/include/ipc",
50    "${innerkits_path}/native_cpp/include/ipc/standard",
51  ]
52
53  cflags = [
54    "-g",
55    "-O0",
56    "-Dprivate=public",
57    "-Dprotected=public",
58    "-Werror",
59    "-Wno-unused-variable",
60    "-fno-omit-frame-pointer",
61  ]
62
63  sources = [ "pinauth_fuzzer.cpp" ]
64
65  deps = [
66    "${ext_path}/pin_auth:devicemanagerext_pin_auth",
67    "${innerkits_path}/native_cpp:devicemanagersdk",
68    "${services_path}:devicemanagerservice",
69    "${servicesimpl_path}:devicemanagerserviceimpl",
70    "${utils_path}:devicemanagerutils",
71  ]
72
73  defines = [
74    "HI_LOG_ENABLE",
75    "DH_LOG_TAG=\"PinAuthFuzzTest\"",
76    "LOG_DOMAIN=0xD004110",
77  ]
78
79  external_deps = [
80    "ability_base:want",
81    "ability_runtime:ability_manager",
82    "common_event_service:cesfwk_core",
83    "common_event_service:cesfwk_innerkits",
84    "device_auth:deviceauth_sdk",
85    "device_info_manager:distributed_device_profile_common",
86    "device_info_manager:distributed_device_profile_sdk",
87    "dsoftbus:softbus_client",
88    "hilog:libhilog",
89    "init:libbegetutil",
90    "ipc:ipc_single",
91    "resource_management:resmgr_napi_core",
92    "safwk:system_ability_fwk",
93  ]
94}
95
96###############################################################################
97group("fuzztest") {
98  testonly = true
99  deps = [ ":PinAuthFuzzTest" ]
100}
101###############################################################################
102