• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 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("//base/security/device_auth/deps_adapter/deviceauth_hals.gni")
15import("//base/security/device_auth/services/deviceauth.gni")
16
17#####################hydra-fuzz###################
18import("//build/config/features.gni")
19import("//build/test.gni")
20THIRD_PATH = "//third_party/bounds_checking_function"
21module_output_path = "device_auth/device_auth"
22
23##############################fuzztest##########################################
24ohos_fuzztest("AuthenticatePeerFuzzTest") {
25  module_out_path = module_output_path
26  fuzz_config_file = "${deviceauth_path}/frameworks/deviceauth_lite/fuzztest/authenticatepeer_fuzzer"
27  include_dirs = []
28  include_dirs += [
29    "${deviceauth_path}/interfaces/inner_api/deviceauth_lite",
30    "${deviceauth_path}/frameworks/deviceauth_lite/source/schdeule",
31    "${deviceauth_path}/frameworks/deviceauth_lite/source/key_agreement",
32    "${deviceauth_path}/frameworks/deviceauth_lite/source/base",
33    "${deviceauth_path}/frameworks/deviceauth_lite/source/struct",
34    "$THIRD_PATH/include",
35    "${deviceauth_path}/frameworks/deviceauth_lite/source/json",
36  ]
37  cflags = [
38    "-g",
39    "-O0",
40    "-Wno-unused-variable",
41    "-fno-omit-frame-pointer",
42  ]
43  cflags_cc = [ "--coverage" ]
44
45  ldflags = [ "--coverage" ]
46
47  sources = [ "authenticatepeer_fuzzer.cpp" ]
48  deps = [
49    "$THIRD_PATH:libsec_shared",
50    "${deviceauth_path}/frameworks/deviceauth_lite/source:hichainsdk",
51  ]
52}
53
54###############################################################################
55group("fuzztest") {
56  testonly = true
57  deps = []
58  deps += [
59    # deps file
60    ":AuthenticatePeerFuzzTest",
61  ]
62}
63###############################################################################
64