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