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("//build/config/features.gni")
16import("//build/ohos.gni")
17import("//build/test.gni")
18CELLULAR_CALL_PATH = "../../.."
19
20##############################fuzztest##########################################
21ohos_fuzztest("SatelliteCallRequestFuzzTest") {
22  module_output_path = "cellular_call/cellular_call"
23  module_out_path = module_output_path
24  fuzz_config_file =
25      "${CELLULAR_CALL_PATH}/test/fuzztest/satellitecallrequest_fuzzer"
26
27  include_dirs = [
28    "${CELLULAR_CALL_PATH}/interfaces/innerkits/satellite",
29    "${CELLULAR_CALL_PATH}/interfaces/innerkits/ims",
30    "${CELLULAR_CALL_PATH}/test/fuzztest/common_fuzzer",
31    "${CELLULAR_CALL_PATH}/services/common/include",
32    "${CELLULAR_CALL_PATH}/services/manager/include",
33    "${CELLULAR_CALL_PATH}/services/control/include",
34    "${CELLULAR_CALL_PATH}/services/connection/include",
35    "//third_party/libphonenumber/cpp/src",
36    "//third_party/libphonenumber/cpp/src/phonenumbers",
37  ]
38
39  deps = [
40    "${CELLULAR_CALL_PATH}:tel_cellular_call",
41    "${CELLULAR_CALL_PATH}/interfaces/innerkits/satellite:tel_satellite_call_api",
42  ]
43
44  external_deps = [
45    "ability_base:want",
46    "access_token:libaccesstoken_sdk",
47    "access_token:libnativetoken",
48    "access_token:libtoken_setproc",
49    "bundle_framework:appexecfwk_core",
50    "c_utils:utils",
51    "call_manager:tel_call_manager_api",
52    "common_event_service:cesfwk_innerkits",
53    "core_service:libtel_common",
54    "core_service:tel_core_service_api",
55    "eventhandler:libeventhandler",
56    "graphic_surface:surface",
57    "hilog:libhilog",
58    "hisysevent:libhisysevent",
59    "hitrace:hitrace_meter",
60    "init:libbegetutil",
61    "ipc:ipc_single",
62    "resource_management:global_resmgr",
63    "safwk:system_ability_fwk",
64    "samgr:samgr_proxy",
65  ]
66  defines = [
67    "TELEPHONY_LOG_TAG = \"SatelliteCallRequestFuzzTest\"",
68    "LOG_DOMAIN = 0xD000F00",
69  ]
70
71  cflags = [
72    "-g",
73    "-O0",
74    "-Wno-unused-variable",
75    "-fno-omit-frame-pointer",
76    "-flto",
77    "-fsanitize=cfi",
78    "-fsanitize-cfi-cross-dso",
79    "-fvisibility=hidden",
80  ]
81
82  ldflags = [
83    "-flto",
84    "-fsanitize=cfi",
85    "-fsanitize-cfi-cross-dso",
86  ]
87
88  sources = [
89    "${CELLULAR_CALL_PATH}/test/fuzztest/common_fuzzer/addcellularcalltoken_fuzzer.cpp",
90    "satellitecallrequest_fuzzer.cpp",
91  ]
92}
93
94###############################################################################
95group("fuzztest") {
96  testonly = true
97  deps = []
98  deps += [
99    # deps file
100    ":SatelliteCallRequestFuzzTest",
101  ]
102}
103###############################################################################
104