• 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/AudioDeviceFuzzTest"
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    "camera_framework:camera_framework",
67    "common_event_service:cesfwk_innerkits",
68    "core_service:tel_core_service_api",
69    "data_share:datashare_consumer",
70    "eventhandler:libeventhandler",
71    "hilog:libhilog",
72    "hisysevent:libhisysevent",
73    "hitrace:hitrace_meter",
74    "init:libbegetutil",
75    "ipc:ipc_single",
76    "power_manager:powermgr_client",
77    "safwk:system_ability_fwk",
78    "samgr:samgr_proxy",
79    "sms_mms:tel_sms_mms_api",
80  ]
81  defines = [
82    "TELEPHONY_LOG_TAG = \"CallManagerFuzzTest\"",
83    "LOG_DOMAIN = 0xD000F00",
84  ]
85  cflags = [
86    "-g",
87    "-O0",
88    "-Wno-unused-variable",
89    "-fno-omit-frame-pointer",
90  ]
91  sources = [
92    "${CALL_MANAGER_PATH}/test/fuzztest/common_fuzzer/addcalltoken_fuzzer.cpp",
93    "audiodevice_fuzzer.cpp",
94  ]
95}
96
97###############################################################################
98group("fuzztest") {
99  testonly = true
100  deps = []
101  deps += [
102    # deps file
103    ":AudioDeviceFuzzTest",
104  ]
105}
106###############################################################################
107