• 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("SendTerminalResponseCmdFuzzTest") {
22  module_output_path = "core_service/SendTerminalResponseCmdFuzzTest"
23  module_out_path = module_output_path
24  fuzz_config_file = "//base/telephony/core_service/test/fuzztest/sendterminalresponsecmd_fuzzer"
25
26  include_dirs = [
27    "//base/telephony/core_service/frameworks/js/napi/include",
28    "//base/telephony/core_service/frameworks/js/napi",
29    "//base/telephony/core_service/services/sim/include",
30    "//base/telephony/core_service/services/core/include",
31    "//base/telephony/core_service/services/tel_ril/include",
32    "//base/telephony/core_service/test/fuzztest/common_fuzzer",
33  ]
34
35  configs = [ "//base/telephony/core_service/utils:telephony_log_config" ]
36
37  deps = [
38    "//base/telephony/core_service:tel_core_service",
39    "//base/telephony/core_service/interfaces/innerkits:tel_core_service_api",
40    "//foundation/arkui/napi:ace_napi",
41  ]
42
43  external_deps = [
44    "ability_base:want",
45    "ability_base:zuri",
46    "ability_runtime:ability_manager",
47    "ability_runtime:data_ability_helper",
48    "ability_runtime:wantagent_innerkits",
49    "access_token:libaccesstoken_sdk",
50    "access_token:libnativetoken",
51    "access_token:libtoken_setproc",
52    "battery_manager:batterysrv_client",
53    "c_utils:utils",
54    "common_event_service:cesfwk_innerkits",
55    "config_policy:configpolicy_util",
56    "drivers_interface_ril:hril_innerkits",
57    "drivers_interface_ril:libril_proxy_1.0",
58    "eventhandler:libeventhandler",
59    "hdf_core:libhdi",
60    "hisysevent_native:libhisysevent",
61    "i18n:zone_util",
62    "init:libbegetutil",
63    "ipc:ipc_core",
64    "netmanager_base:net_conn_manager_if",
65    "netmanager_ext:net_tether_manager_if",
66    "power_manager:powermgr_client",
67    "relational_store:native_dataability",
68    "relational_store:native_rdb",
69    "safwk:system_ability_fwk",
70    "samgr:samgr_proxy",
71  ]
72  defines += [
73    "TELEPHONY_LOG_TAG = \"CoreServiceFuzzTest\"",
74    "LOG_DOMAIN = 0xD000F00",
75  ]
76  if (is_standard_system) {
77    external_deps += [ "hiviewdfx_hilog_native:libhilog" ]
78  } else {
79    external_deps += [ "hilog:libhilog" ]
80  }
81
82  cflags = [
83    "-g",
84    "-O0",
85    "-Wno-unused-variable",
86    "-fno-omit-frame-pointer",
87  ]
88  sources = [
89    "//base/telephony/core_service/frameworks/js/napi/napi_util.cpp",
90    "//base/telephony/core_service/test/fuzztest/common_fuzzer/addcoreservicetoken_fuzzer.cpp",
91    "sendterminalresponsecmd_fuzzer.cpp",
92  ]
93}
94
95###############################################################################
96group("fuzztest") {
97  testonly = true
98  deps = []
99  deps += [
100    # deps file
101    ":SendTerminalResponseCmdFuzzTest",
102  ]
103}
104###############################################################################
105