1d95e75fdSopenharmony_ci# Copyright (c) 2022 Huawei Device Co., Ltd.
2d95e75fdSopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License");
3d95e75fdSopenharmony_ci# you may not use this file except in compliance with the License.
4d95e75fdSopenharmony_ci# You may obtain a copy of the License at
5d95e75fdSopenharmony_ci#
6d95e75fdSopenharmony_ci#     http://www.apache.org/licenses/LICENSE-2.0
7d95e75fdSopenharmony_ci#
8d95e75fdSopenharmony_ci# Unless required by applicable law or agreed to in writing, software
9d95e75fdSopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS,
10d95e75fdSopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11d95e75fdSopenharmony_ci# See the License for the specific language governing permissions and
12d95e75fdSopenharmony_ci# limitations under the License.
13d95e75fdSopenharmony_ci
14d95e75fdSopenharmony_ci#####################hydra-fuzz###################
15d95e75fdSopenharmony_ciimport("//build/config/features.gni")
16d95e75fdSopenharmony_ciimport("//build/ohos.gni")
17d95e75fdSopenharmony_ciCELLULAR_CALL_PATH = "../../.."
18d95e75fdSopenharmony_ci
19d95e75fdSopenharmony_ciimport("//build/test.gni")
20d95e75fdSopenharmony_ci
21d95e75fdSopenharmony_ci##############################fuzztest##########################################
22d95e75fdSopenharmony_ciohos_fuzztest("DialRequestFuzzTest") {
23d95e75fdSopenharmony_ci  module_output_path = "cellular_call/cellular_call"
24d95e75fdSopenharmony_ci  module_out_path = module_output_path
25d95e75fdSopenharmony_ci  fuzz_config_file = "${CELLULAR_CALL_PATH}/test/fuzztest/dialrequest_fuzzer"
26d95e75fdSopenharmony_ci
27d95e75fdSopenharmony_ci  include_dirs = [
28d95e75fdSopenharmony_ci    "${CELLULAR_CALL_PATH}/test/fuzztest/common_fuzzer",
29d95e75fdSopenharmony_ci    "${CELLULAR_CALL_PATH}/services/common/include",
30d95e75fdSopenharmony_ci    "${CELLULAR_CALL_PATH}/services/manager/include",
31d95e75fdSopenharmony_ci    "${CELLULAR_CALL_PATH}/services/control/include",
32d95e75fdSopenharmony_ci    "${CELLULAR_CALL_PATH}/services/connection/include",
33d95e75fdSopenharmony_ci    "//third_party/libphonenumber/cpp/src",
34d95e75fdSopenharmony_ci    "//third_party/libphonenumber/cpp/src/phonenumbers",
35d95e75fdSopenharmony_ci  ]
36d95e75fdSopenharmony_ci
37d95e75fdSopenharmony_ci  deps = [
38d95e75fdSopenharmony_ci    "${CELLULAR_CALL_PATH}:tel_cellular_call",
39d95e75fdSopenharmony_ci    "${CELLULAR_CALL_PATH}/interfaces/innerkits/ims:tel_ims_call_api",
40d95e75fdSopenharmony_ci    "${CELLULAR_CALL_PATH}/interfaces/innerkits/satellite:tel_satellite_call_api",
41d95e75fdSopenharmony_ci  ]
42d95e75fdSopenharmony_ci
43d95e75fdSopenharmony_ci  external_deps = [
44d95e75fdSopenharmony_ci    "ability_base:want",
45d95e75fdSopenharmony_ci    "access_token:libaccesstoken_sdk",
46d95e75fdSopenharmony_ci    "access_token:libnativetoken",
47d95e75fdSopenharmony_ci    "access_token:libtoken_setproc",
48d95e75fdSopenharmony_ci    "bundle_framework:appexecfwk_core",
49d95e75fdSopenharmony_ci    "c_utils:utils",
50d95e75fdSopenharmony_ci    "call_manager:tel_call_manager_api",
51d95e75fdSopenharmony_ci    "common_event_service:cesfwk_innerkits",
52d95e75fdSopenharmony_ci    "core_service:libtel_common",
53d95e75fdSopenharmony_ci    "core_service:tel_core_service_api",
54d95e75fdSopenharmony_ci    "eventhandler:libeventhandler",
55d95e75fdSopenharmony_ci    "graphic_surface:surface",
56d95e75fdSopenharmony_ci    "hilog:libhilog",
57d95e75fdSopenharmony_ci    "hisysevent:libhisysevent",
58d95e75fdSopenharmony_ci    "hitrace:hitrace_meter",
59d95e75fdSopenharmony_ci    "init:libbegetutil",
60d95e75fdSopenharmony_ci    "ipc:ipc_single",
61d95e75fdSopenharmony_ci    "resource_management:global_resmgr",
62d95e75fdSopenharmony_ci    "safwk:system_ability_fwk",
63d95e75fdSopenharmony_ci    "samgr:samgr_proxy",
64d95e75fdSopenharmony_ci  ]
65d95e75fdSopenharmony_ci  defines = [
66d95e75fdSopenharmony_ci    "TELEPHONY_LOG_TAG = \"CellularCallFuzzTest\"",
67d95e75fdSopenharmony_ci    "LOG_DOMAIN = 0xD000F00",
68d95e75fdSopenharmony_ci  ]
69d95e75fdSopenharmony_ci
70d95e75fdSopenharmony_ci  cflags = [
71d95e75fdSopenharmony_ci    "-g",
72d95e75fdSopenharmony_ci    "-O0",
73d95e75fdSopenharmony_ci    "-Wno-unused-variable",
74d95e75fdSopenharmony_ci    "-fno-omit-frame-pointer",
75d95e75fdSopenharmony_ci  ]
76d95e75fdSopenharmony_ci  sources = [
77d95e75fdSopenharmony_ci    "${CELLULAR_CALL_PATH}/test/fuzztest/common_fuzzer/addcellularcalltoken_fuzzer.cpp",
78d95e75fdSopenharmony_ci    "dialrequest_fuzzer.cpp",
79d95e75fdSopenharmony_ci  ]
80d95e75fdSopenharmony_ci}
81d95e75fdSopenharmony_ci
82d95e75fdSopenharmony_ci###############################################################################
83d95e75fdSopenharmony_cigroup("fuzztest") {
84d95e75fdSopenharmony_ci  testonly = true
85d95e75fdSopenharmony_ci  deps = []
86d95e75fdSopenharmony_ci  deps += [
87d95e75fdSopenharmony_ci    # deps file
88d95e75fdSopenharmony_ci    ":DialRequestFuzzTest",
89d95e75fdSopenharmony_ci  ]
90d95e75fdSopenharmony_ci}
91d95e75fdSopenharmony_ci###############################################################################
92