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