• 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")
17import("../../../callmanager.gni")
18
19#####################hydra-fuzz###################
20CALL_MANAGER_PATH = "../../.."
21
22##############################fuzztest##########################################
23
24ohos_fuzztest("AudioDeviceFuzzTest") {
25  module_output_path = "call_manager/call_manager"
26  module_out_path = module_output_path
27  fuzz_config_file = "${CALL_MANAGER_PATH}/test/fuzztest/audiodevice_fuzzer"
28
29  include_dirs = [
30    "${CALL_MANAGER_PATH}/interfaces/innerkits",
31    "${CALL_MANAGER_PATH}/test/fuzztest/common_fuzzer",
32  ]
33  include_dirs += call_manager_include_dirs
34
35  deps = [
36    "${CALL_MANAGER_PATH}/frameworks/native:tel_call_manager_api",
37  ]
38
39  external_deps = [
40    "access_token:libnativetoken_shared",
41    "access_token:libtoken_setproc",
42    "cJSON:cjson",
43    "libphonenumber:phonenumber_standard",
44  ]
45  external_deps += call_manager_external_deps
46
47  defines = [
48    "TELEPHONY_LOG_TAG = \"CallManagerFuzzTest\"",
49    "LOG_DOMAIN = 0xD000F00",
50  ]
51  defines += call_manager_defines
52
53  cflags = [
54    "-g",
55    "-O0",
56    "-Wno-unused-variable",
57    "-fno-omit-frame-pointer",
58  ]
59
60  sources = [
61    "${CALL_MANAGER_PATH}/test/fuzztest/common_fuzzer/addcalltoken_fuzzer.cpp",
62    "audiodevice_fuzzer.cpp",
63  ]
64  sources += call_manager_sources
65}
66
67###############################################################################
68group("fuzztest") {
69  testonly = true
70  deps = []
71  deps += [
72    # deps file
73    ":AudioDeviceFuzzTest",
74  ]
75}
76###############################################################################
77