• 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
14import("//build/config/features.gni")
15import("//build/ohos.gni")
16import("//build/test.gni")
17
18#####################hydra-fuzz###################
19CALL_MANAGER_PATH = "../../.."
20
21##############################fuzztest##########################################
22
23ohos_fuzztest("AudioDeviceFuzzTest") {
24  module_output_path = "call_manager/call_manager"
25  module_out_path = module_output_path
26  fuzz_config_file = "${CALL_MANAGER_PATH}/test/fuzztest/audiodevice_fuzzer"
27  include_dirs = [
28    "utils/include",
29    "//third_party/libphonenumber/cpp/src",
30    "//third_party/libphonenumber/cpp/src/phonenumbers",
31    "//third_party/protobuf/src",
32    "//third_party/protobuf/src/google/protobuf",
33    "${CALL_MANAGER_PATH}/interfaces/innerkits",
34    "${CALL_MANAGER_PATH}/services/audio/include",
35    "${CALL_MANAGER_PATH}/services/audio/include/audio_state",
36    "${CALL_MANAGER_PATH}/services/video/include",
37    "${CALL_MANAGER_PATH}/services/bluetooth/include",
38    "${CALL_MANAGER_PATH}/services/call/include",
39    "${CALL_MANAGER_PATH}/services/call_manager_service/include",
40    "${CALL_MANAGER_PATH}/services/call_setting/include",
41    "${CALL_MANAGER_PATH}/services/telephony_interaction/include",
42    "${CALL_MANAGER_PATH}/services/call_report/include",
43    "${CALL_MANAGER_PATH}/services/video/include",
44    "${CALL_MANAGER_PATH}/services/call/call_state_observer/include",
45    "${CALL_MANAGER_PATH}/frameworks/native/include",
46    "${CALL_MANAGER_PATH}/test/fuzztest/common_fuzzer",
47  ]
48
49  deps = [
50    "${CALL_MANAGER_PATH}:tel_call_manager",
51    "${CALL_MANAGER_PATH}/frameworks/native:tel_call_manager_api",
52  ]
53
54  external_deps = [
55    "ability_base:base",
56    "ability_base:want",
57    "ability_base:zuri",
58    "ability_runtime:ability_manager",
59    "access_token:libaccesstoken_sdk",
60    "access_token:libnativetoken",
61    "access_token:libtoken_setproc",
62    "audio_framework:audio_client",
63    "audio_framework:audio_renderer",
64    "audio_framework:audio_toneplayer",
65    "c_utils:utils",
66    "common_event_service:cesfwk_innerkits",
67    "core_service:tel_core_service_api",
68    "data_share:datashare_consumer",
69    "eventhandler:libeventhandler",
70    "graphic_surface:surface",
71    "hilog:libhilog",
72    "hisysevent:libhisysevent",
73    "hitrace:hitrace_meter",
74    "init:libbegetutil",
75    "ipc:ipc_single",
76    "player_framework:system_sound_client",
77    "power_manager:powermgr_client",
78    "safwk:system_ability_fwk",
79    "samgr:samgr_proxy",
80    "sms_mms:tel_sms_mms_api",
81  ]
82  defines = [
83    "TELEPHONY_LOG_TAG = \"CallManagerFuzzTest\"",
84    "LOG_DOMAIN = 0xD000F00",
85  ]
86  cflags = [
87    "-g",
88    "-O0",
89    "-Wno-unused-variable",
90    "-fno-omit-frame-pointer",
91  ]
92  sources = [
93    "${CALL_MANAGER_PATH}/test/fuzztest/common_fuzzer/addcalltoken_fuzzer.cpp",
94    "audiodevice_fuzzer.cpp",
95  ]
96}
97
98###############################################################################
99group("fuzztest") {
100  testonly = true
101  deps = []
102  deps += [
103    # deps file
104    ":AudioDeviceFuzzTest",
105  ]
106}
107###############################################################################
108