• 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("UpdateActiveMachineFuzzTest") {
22  module_output_path = "cellular_data/UpdateActiveMachineFuzzTest"
23  module_out_path = module_output_path
24  fuzz_config_file =
25      "//base/telephony/cellular_data/test/fuzztest/updateactivemachine_fuzzer"
26  include_dirs = [
27    "//base/telephony/cellular_data/services/include",
28    "//base/telephony/cellular_data/services/include/apn_manager",
29    "//base/telephony/cellular_data/services/include/common",
30    "//base/telephony/cellular_data/services/include/state_machine",
31    "//base/telephony/cellular_data/services/include/utils",
32    "//base/telephony/cellular_data/test/fuzztest/common_fuzzer",
33    "//base/telephony/data_storage/pdp_profile/include",
34  ]
35
36  configs = [ "//base/telephony/core_service/utils:telephony_log_config" ]
37
38  deps = [ "//base/telephony/cellular_data:tel_cellular_data" ]
39
40  external_deps = [
41    "ability_runtime:ability_manager",
42    "ability_runtime:data_ability_helper",
43    "access_token:libaccesstoken_sdk",
44    "access_token:libnativetoken",
45    "access_token:libtoken_setproc",
46    "bundle_framework:appexecfwk_core",
47    "c_utils:utils",
48    "cellular_data:tel_cellular_data_api",
49    "common_event_service:cesfwk_innerkits",
50    "core_service:libtel_common",
51    "core_service:tel_core_service_api",
52    "eventhandler:libeventhandler",
53    "init:libbegetutil",
54    "netmanager_base:net_conn_manager_if",
55    "netmanager_base:net_policy_manager_if",
56    "netmanager_base:net_stats_manager_if",
57    "relational_store:native_rdb",
58  ]
59
60  defines += [
61    "TELEPHONY_LOG_TAG = \"CellularDataFuzzTest\"",
62    "LOG_DOMAIN = 0xD000F00",
63  ]
64
65  cflags = [
66    "-g",
67    "-O0",
68    "-Wno-unused-variable",
69    "-fno-omit-frame-pointer",
70  ]
71
72  sources = [
73    "//base/telephony/cellular_data/test/fuzztest/common_fuzzer/adddatatoken_fuzzer.cpp",
74    "//base/telephony/cellular_data/test/fuzztest/common_fuzzer/statemachine_fuzzer.cpp",
75    "updateactivemachine_fuzzer.cpp",
76  ]
77
78  if (is_standard_system) {
79    external_deps += [ "hiviewdfx_hilog_native:libhilog" ]
80  } else {
81    external_deps += [ "hilog:libhilog" ]
82  }
83}
84
85###############################################################################
86group("fuzztest") {
87  testonly = true
88  deps = []
89  deps += [
90    # deps file
91    ":UpdateActiveMachineFuzzTest",
92  ]
93}
94###############################################################################
95