• 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
14#####################hydra-fuzz###################
15import("//base/telephony/core_service/telephony.gni")
16import("//build/config/features.gni")
17import("//build/ohos.gni")
18import("//build/test.gni")
19
20##############################fuzztest##########################################
21ohos_fuzztest("AudioDeviceFuzzTest") {
22  module_output_path = "call_manager/AudioDeviceFuzzTest"
23  module_out_path = module_output_path
24  fuzz_config_file =
25      "//base/telephony/call_manager/test/fuzztest/audiodevice_fuzzer"
26  include_dirs = [
27    "//base/telephony/call_manager/frameworks/native/include",
28    "//base/telephony/call_manager/frameworks/native/include",
29    "//base/telephony/core_service/interfaces/innerkits/include",
30    "utils/include",
31    "//third_party/libphonenumber/cpp/src",
32    "//third_party/libphonenumber/cpp/src/phonenumbers",
33    "//third_party/protobuf/src",
34    "//third_party/protobuf/src/google/protobuf",
35    "//base/telephony/call_manager/interfaces/innerkits",
36    "//base/telephony/sms_mms/interfaces/innerkits/",
37    "//base/telephony/call_manager/services/audio/include",
38    "//base/telephony/call_manager/services/audio/include/audio_state",
39    "//base/telephony/call_manager/services/video/include",
40    "//base/telephony/call_manager/services/bluetooth/include",
41    "//base/telephony/call_manager/services/call/include",
42    "//base/telephony/call_manager/services/call_manager_service/include",
43    "//base/telephony/call_manager/services/call_setting/include",
44    "//base/telephony/call_manager/services/telephony_interaction/include",
45    "//base/telephony/call_manager/services/call_report/include",
46    "//base/telephony/call_manager/services/video/include",
47    "//base/telephony/call_manager/services/call/call_state_observer/include",
48    "//base/telephony/call_manager/frameworks/native/include",
49    "//base/telephony/call_manager/test/fuzztest/common_fuzzer",
50    "//foundation/graphic/graphic_2d/interfaces/inner_api/surface",
51    "//foundation/graphic/graphic_2d/interfaces/inner_api/common",
52    "//drivers/peripheral/camera/interfaces/metadata/include",
53    "//drivers/hdf_core/framework/include/utils",
54    "//drivers/hdf_core/adapter/uhdf2/utils/include",
55    "//drivers/hdf_core/adapter/uhdf2/include/hdi",
56    "//drivers/peripheral/display/interfaces/include",
57    "//drivers/peripheral/camera/interfaces/include",
58    "//drivers/peripheral/camera/interfaces/include/server",
59    "//drivers/peripheral/camera/interfaces/include/callback/device",
60    "//drivers/peripheral/camera/interfaces/include/callback/operator",
61    "//drivers/peripheral/camera/interfaces/include/callback/host",
62    "//foundation/graphic/graphic_2d/utils/buffer_handle/export",
63    "//foundation/multimedia/audio_framework/interfaces/inner_api/native/audioringtone/include",
64    "//foundation/multimedia/audio_framework/frameworks/native/systemsound",
65    "//foundation/multimedia/player_framework/interfaces/inner_api/native",
66    "//foundation/multimedia/media_library/interfaces/innerkits/native/include",
67  ]
68
69  configs = [ "//base/telephony/core_service/utils:telephony_log_config" ]
70
71  deps = [ "//base/telephony/call_manager:tel_call_manager" ]
72
73  external_deps = [
74    "ability_base:base",
75    "ability_base:want",
76    "ability_base:zuri",
77    "ability_runtime:ability_manager",
78    "access_token:libaccesstoken_sdk",
79    "access_token:libnativetoken",
80    "access_token:libtoken_setproc",
81    "c_utils:utils",
82    "common_event_service:cesfwk_innerkits",
83    "core_service:tel_core_service_api",
84    "data_share:datashare_consumer",
85    "eventhandler:libeventhandler",
86    "hisysevent_native:libhisysevent",
87    "hitrace_native:hitrace_meter",
88    "init:libbegetutil",
89    "ipc:ipc_core",
90    "multimedia_audio_framework:audio_client",
91    "multimedia_audio_framework:audio_renderer",
92    "multimedia_camera_framework:camera_framework",
93    "multimedia_player_framework:audio_ringtone_client",
94    "power_manager:powermgr_client",
95    "safwk:system_ability_fwk",
96    "samgr:samgr_proxy",
97  ]
98  defines += [
99    "TELEPHONY_LOG_TAG = \"CallManagerFuzzTest\"",
100    "LOG_DOMAIN = 0xD000F00",
101  ]
102  cflags = [
103    "-g",
104    "-O0",
105    "-Wno-unused-variable",
106    "-fno-omit-frame-pointer",
107  ]
108  sources = [
109    "//base/telephony/call_manager/test/fuzztest/common_fuzzer/addcalltoken_fuzzer.cpp",
110    "audiodevice_fuzzer.cpp",
111  ]
112  if (is_standard_system) {
113    external_deps += [ "hiviewdfx_hilog_native:libhilog" ]
114  } else {
115    external_deps += [ "hilog:libhilog" ]
116  }
117}
118
119###############################################################################
120group("fuzztest") {
121  testonly = true
122  deps = []
123  deps += [
124    # deps file
125    ":AudioDeviceFuzzTest",
126  ]
127}
128###############################################################################
129