• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2022-2025 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###################
15SUBSYSTEM_DIR = "../../../.."
16import("//build/config/features.gni")
17import("//build/ohos.gni")
18import("//build/test.gni")
19
20##############################fuzztest##########################################
21ohos_fuzztest("VoiceMailConstantsFuzzTest") {
22  module_output_path = "core_service/core_service"
23  module_out_path = module_output_path
24  fuzz_config_file =
25      "$SUBSYSTEM_DIR/core_service/test/fuzztest/voicemailconstants_fuzzer"
26
27  include_dirs = [
28    "$SUBSYSTEM_DIR/core_service/frameworks/js/napi/include",
29    "$SUBSYSTEM_DIR/core_service/frameworks/js/napi",
30    "$SUBSYSTEM_DIR/core_service/services/sim/include",
31    "$SUBSYSTEM_DIR/core_service/services/core/include",
32    "$SUBSYSTEM_DIR/core_service/services/tel_ril/include",
33    "$SUBSYSTEM_DIR/core_service/test/fuzztest/common_fuzzer",
34    "$SUBSYSTEM_DIR/core_service/utils/common/include",
35  ]
36
37  configs = [ "$SUBSYSTEM_DIR/core_service/utils:telephony_log_config" ]
38
39  deps = [
40    "$SUBSYSTEM_DIR/core_service:tel_core_service",
41    "$SUBSYSTEM_DIR/core_service/interfaces/innerkits:tel_core_service_api",
42    "$SUBSYSTEM_DIR/core_service/test/mock/ffrt:ffrt_mocked",
43    "$SUBSYSTEM_DIR/core_service/utils:libtel_common",
44  ]
45
46  external_deps = [
47    "ability_base:want",
48    "ability_base:zuri",
49    "ability_runtime:ability_manager",
50    "ability_runtime:data_ability_helper",
51    "ability_runtime:wantagent_innerkits",
52    "access_token:libaccesstoken_sdk",
53    "access_token:libnativetoken_shared",
54    "access_token:libtoken_setproc",
55    "battery_manager:batterysrv_client",
56    "c_utils:utils",
57    "common_event_service:cesfwk_innerkits",
58    "config_policy:configpolicy_util",
59    "cJSON:cjson",
60    "drivers_interface_ril:libril_proxy_1.1",
61    "data_share:datashare_consumer",
62    "eventhandler:libeventhandler",
63    "hdf_core:libhdi",
64    "hdf_core:libpub_utils",
65    "hilog:libhilog",
66    "hisysevent:libhisysevent",
67    "i18n:zone_util",
68    "init:libbegetutil",
69    "ipc:ipc_single",
70    "libxml2:libxml2",
71    "napi:ace_napi",
72    "netmanager_base:net_conn_manager_if",
73    "netmanager_ext:net_tether_manager_if",
74    "power_manager:powermgr_client",
75    "safwk:system_ability_fwk",
76    "samgr:samgr_proxy",
77  ]
78  defines = [
79    "TELEPHONY_LOG_TAG = \"VoiceMailConstantsFuzzTest\"",
80    "LOG_DOMAIN = 0xD000F00",
81  ]
82
83  cflags = [
84    "-g",
85    "-O0",
86    "-Wno-unused-variable",
87    "-fno-omit-frame-pointer",
88    "-flto",
89    "-fsanitize=cfi",
90    "-fsanitize-cfi-cross-dso",
91    "-fvisibility=hidden",
92  ]
93
94  ldflags = [
95    "-flto",
96    "-fsanitize=cfi",
97    "-fsanitize-cfi-cross-dso",
98  ]
99
100  sources = [
101    "$SUBSYSTEM_DIR/core_service/frameworks/js/napi/napi_util.cpp",
102    "$SUBSYSTEM_DIR/core_service/test/fuzztest/common_fuzzer/addcoreservicetoken_fuzzer.cpp",
103    "voicemailconstants_fuzzer.cpp",
104  ]
105}
106
107###############################################################################
108group("fuzztest") {
109  testonly = true
110  deps = []
111  deps += [
112    # deps file
113    ":VoiceMailConstantsFuzzTest",
114  ]
115}
116###############################################################################