• 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("TextBasedSmsDeliveryFuzzTest") {
22  module_output_path = "sms_mms/TextBasedSmsDeliveryFuzzTest"
23  module_out_path = module_output_path
24  fuzz_config_file =
25      "//base/telephony/sms_mms/test/fuzztest/textbasedsmsdelivery_fuzzer"
26
27  include_dirs = [
28    "//base/telephony/core_service/frameworks/js/napi",
29    "//base/telephony/core_service/interfaces/innerkits/include",
30    "//base/telephony/core_service/interfaces/innerkits/ims/include",
31    "//base/telephony/sms_mms/frameworks/js/napi/include",
32    "//base/telephony/sms_mms/services/include",
33    "//base/telephony/sms_mms/test/fuzztest/common_fuzzer",
34    "//base/telephony/sms_mms/interfaces/innerkits/",
35    "//base/telephony/sms_mms/interfaces/innerkits/ims",
36    "//third_party/curl/include",
37    "//foundation/communication/netmanager_base/services/netconnmanager/include",
38  ]
39
40  deps = [
41    "//base/telephony/sms_mms:tel_sms_mms",
42    "//base/telephony/sms_mms/frameworks/native:tel_sms_mms_api",
43    "//foundation/ability/ability_runtime/frameworks/native/ability/native:data_ability_helper",
44    "//foundation/ability/ability_runtime/interfaces/inner_api/ability_manager:ability_manager",
45    "//foundation/communication/netmanager_base/services/netconnmanager:net_conn_manager",
46    "//third_party/curl:curl",
47  ]
48
49  external_deps = [
50    "access_token:libaccesstoken_sdk",
51    "access_token:libnativetoken",
52    "access_token:libtoken_setproc",
53    "c_utils:utils",
54    "common_event_service:cesfwk_innerkits",
55    "eventhandler:libeventhandler",
56    "ipc:ipc_core",
57    "netmanager_base:net_conn_manager_if",
58  ]
59  defines += [
60    "TELEPHONY_LOG_TAG = \"SmsMmsFuzzTest\"",
61    "LOG_DOMAIN = 0xD000F00",
62  ]
63  if (is_standard_system) {
64    external_deps += [ "hiviewdfx_hilog_native:libhilog" ]
65  } else {
66    external_deps += [ "hilog:libhilog" ]
67  }
68
69  cflags = [
70    "-g",
71    "-O0",
72    "-Wno-unused-variable",
73    "-fno-omit-frame-pointer",
74  ]
75
76  sources = [
77    "//base/telephony/sms_mms/test/fuzztest/common_fuzzer/addsmstoken_fuzzer.cpp",
78    "textbasedsmsdelivery_fuzzer.cpp",
79  ]
80}
81
82###############################################################################
83group("fuzztest") {
84  testonly = true
85  deps = []
86  deps += [
87    # deps file
88    ":TextBasedSmsDeliveryFuzzTest",
89  ]
90}
91###############################################################################
92