• 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
14#####################hydra-fuzz###################
15import("//base/telephony/core_service/telephony.gni")
16import("//build/config/features.gni")
17import("//build/ohos.gni")
18import("//build/test.gni")
19
20##############################fuzztest##########################################
21ohos_fuzztest("SetShowNameFuzzTest") {
22  module_output_path = "core_service/SetShowNameFuzzTest"
23  module_out_path = module_output_path
24  fuzz_config_file =
25      "//base/telephony/core_service/test/fuzztest/setshowname_fuzzer"
26
27  include_dirs = [
28    "//base/telephony/core_service/frameworks/js/napi/include",
29    "//base/telephony/core_service/frameworks/js/napi",
30    "//base/telephony/core_service/services/core/include",
31    "//base/telephony/core_service/services/network_search/include",
32    "//base/telephony/core_service/services/sim/include",
33    "//base/telephony/core_service/test/fuzztest/common_fuzzer",
34    "//base/telephony/core_service/services/tel_ril/include",
35    "commonlibrary/c_utils/base/include",
36  ]
37
38  configs = [ "//base/telephony/core_service/utils:telephony_log_config" ]
39
40  deps = [
41    "//base/telephony/core_service:tel_core_service",
42    "//base/telephony/core_service/interfaces/innerkits:tel_core_service_api",
43    "//foundation/arkui/napi:ace_napi",
44  ]
45
46  external_deps = [
47    "ability_runtime:ability_manager",
48    "ability_runtime:data_ability_helper",
49    "access_token:libaccesstoken_sdk",
50    "access_token:libnativetoken",
51    "access_token:libtoken_setproc",
52    "c_utils:utils",
53    "drivers_interface_ril:hril_innerkits",
54    "drivers_interface_ril:ril_idl_headers",
55    "init:libbegetutil",
56    "ipc:ipc_core",
57    "netmanager_base:net_conn_manager_if",
58    "netmanager_ext:net_tether_manager_if",
59    "power_manager:powermgr_client",
60    "relational_store:native_rdb",
61    "samgr:samgr_proxy",
62  ]
63  defines += [
64    "TELEPHONY_LOG_TAG = \"CoreServiceFuzzTest\"",
65    "LOG_DOMAIN = 0xD000F00",
66  ]
67  if (is_standard_system) {
68    external_deps += [ "hiviewdfx_hilog_native:libhilog" ]
69  } else {
70    external_deps += [ "hilog:libhilog" ]
71  }
72
73  cflags = [
74    "-g",
75    "-O0",
76    "-Wno-unused-variable",
77    "-fno-omit-frame-pointer",
78  ]
79  sources = [
80    "//base/telephony/core_service/frameworks/js/napi/napi_util.cpp",
81    "//base/telephony/core_service/test/fuzztest/common_fuzzer/addcoreservicetoken_fuzzer.cpp",
82    "setshowname_fuzzer.cpp",
83  ]
84}
85
86###############################################################################
87group("fuzztest") {
88  testonly = true
89  deps = []
90  deps += [
91    # deps file
92    ":SetShowNameFuzzTest",
93  ]
94}
95###############################################################################
96