• 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/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/ohos.gni")
20import("//build/test.gni")
21module_output_path = "device_auth/device_auth_service"
22
23##############################fuzztest##########################################
24ohos_fuzztest("DevAuthServCancelBindRequestFuzzTest") {
25  module_out_path = module_output_path
26  fuzz_config_file = "//base/security/device_auth/test/fuzztest/device_auth_service/devauthservcancelbindrequest_fuzzer"
27  include_dirs = inc_path + hals_inc_path
28  include_dirs += [
29    "//third_party/cJSON",
30    "${frameworks_path}/inc/standard",
31    "${dev_frameworks_path}/inc/hiview_adapter",
32  ]
33  sources = [ "devauthservcancelbindrequest_fuzzer.cpp" ]
34  sources += deviceauth_files
35  sources += hiview_adapter_files
36  if (enable_soft_bus_channel == true) {
37    sources -= soft_bus_channel_files
38    sources += soft_bus_channel_mock_files
39  }
40  defines = deviceauth_defines
41  cflags = [
42    "-g",
43    "-O0",
44    "-Wno-unused-variable",
45    "-fno-omit-frame-pointer",
46    "-DHILOG_ENABLE",
47  ]
48  cflags += build_flags
49  if (target_cpu == "arm") {
50    cflags += [ "-DBINDER_IPC_32BIT" ]
51  }
52  if (support_jsapi) {
53    defines += [ "SUPPORT_OS_ACCOUNT" ]
54  }
55  deps = [
56    "${deps_adapter_path}:${hal_module_name}",
57    "//third_party/cJSON:cjson_static",
58  ]
59  external_deps = [
60    "c_utils:utils",
61    "dsoftbus:softbus_client",
62    "hilog:libhilog",
63    "hisysevent:libhisysevent",
64    "hitrace:hitrace_meter",
65  ]
66  if (support_jsapi) {
67    external_deps += [ "os_account:os_account_innerkits" ]
68  }
69}
70
71###############################################################################
72group("fuzztest") {
73  testonly = true
74  deps = []
75  deps += [
76    # deps file
77    ":DevAuthServCancelBindRequestFuzzTest",
78  ]
79}
80###############################################################################
81