• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2023 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###################
15SUBSYSTEM_DIR = "../../../.."
16import("//build/config/features.gni")
17import("//build/ohos.gni")
18import("//build/test.gni")
19
20##############################fuzztest##########################################
21ohos_fuzztest("TelephonyObserverFuzzTest") {
22  module_output_path = "state_registry/state_registry"
23  module_out_path = module_output_path
24  fuzz_config_file =
25      "$SUBSYSTEM_DIR/state_registry/test/fuzztest/telephonyobserver_fuzzer"
26
27  include_dirs = [
28    "$SUBSYSTEM_DIR/state_registry/interfaces/innerkits/observer",
29    "$SUBSYSTEM_DIR/state_registry/services/include",
30    "$SUBSYSTEM_DIR/state_registry/test/fuzztest/common_fuzzer",
31    "$SUBSYSTEM_DIR/state_registry/frameworks/native/observer/include",
32  ]
33
34  deps = [
35    "$SUBSYSTEM_DIR/state_registry:tel_state_registry",
36    "$SUBSYSTEM_DIR/state_registry/frameworks/native/observer:tel_state_registry_api",
37  ]
38
39  external_deps = [
40    "ability_base:want",
41    "access_token:libaccesstoken_sdk",
42    "access_token:libnativetoken_shared",
43    "access_token:libtoken_setproc",
44    "c_utils:utils",
45    "call_manager:tel_call_manager_api",
46    "common_event_service:cesfwk_innerkits",
47    "core_service:libtel_common",
48    "core_service:tel_core_service_api",
49    "hilog:libhilog",
50    "init:libbegetutil",
51    "ipc:ipc_single",
52    "safwk:system_ability_fwk",
53    "samgr:samgr_proxy",
54  ]
55
56  cflags = [
57    "-g",
58    "-O0",
59    "-Wno-unused-variable",
60    "-fno-omit-frame-pointer",
61  ]
62  sources = [
63    "$SUBSYSTEM_DIR/state_registry/test/fuzztest/common_fuzzer/addstateregistrytoken_fuzzer.cpp",
64    "telephonyobserver_fuzzer.cpp",
65  ]
66}
67
68###############################################################################
69group("fuzztest") {
70  testonly = true
71  deps = []
72  deps += [
73    # deps file
74    ":TelephonyObserverFuzzTest",
75  ]
76}
77###############################################################################
78