• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2022-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")
18SMS_MMS_SOURCE_DIR = "../../../"
19
20##############################fuzztest##########################################
21ohos_fuzztest("DataBasedSmsDeliveryFuzzTest") {
22  module_output_path = "sms_mms/sms_mms"
23  module_out_path = module_output_path
24  fuzz_config_file =
25      "$SMS_MMS_SOURCE_DIR/test/fuzztest/databasedsmsdelivery_fuzzer"
26
27  include_dirs = [
28    "$SMS_MMS_SOURCE_DIR/frameworks/js/napi/include",
29    "$SMS_MMS_SOURCE_DIR/interfaces/innerkits/",
30    "$SMS_MMS_SOURCE_DIR/interfaces/innerkits/ims",
31    "$SMS_MMS_SOURCE_DIR/services/include",
32    "$SMS_MMS_SOURCE_DIR/test/fuzztest/common_fuzzer",
33  ]
34
35  deps = [
36    "$SMS_MMS_SOURCE_DIR:tel_sms_mms",
37    "$SMS_MMS_SOURCE_DIR/frameworks/native:tel_sms_mms_api",
38  ]
39
40  external_deps = [
41    "ability_runtime:ability_manager",
42    "ability_runtime:data_ability_helper",
43    "access_token:libaccesstoken_sdk",
44    "access_token:libnativetoken_shared",
45    "access_token:libtoken_setproc",
46    "c_utils:utils",
47    "common_event_service:cesfwk_innerkits",
48    "core_service:libtel_common",
49    "core_service:tel_core_service_api",
50    "curl:curl_shared",
51    "data_share:datashare_consumer",
52    "eventhandler:libeventhandler",
53    "ffrt:libffrt",
54    "hilog:libhilog",
55    "ipc:ipc_single",
56    "libphonenumber:geocoding",
57    "libphonenumber:phonenumber_standard",
58    "napi:ace_napi",
59    "netmanager_base:net_conn_manager_if",
60    "netstack:http_client",
61    "protobuf:protobuf",
62    "safwk:system_ability_fwk",
63    "telephony_data:tel_telephony_data",
64  ]
65  defines = [
66    "GTEST_API_ = 1",
67    "LOG_DOMAIN = 0xD000F00",
68    "TELEPHONY_LOG_TAG = \"SmsMmsFuzzTest\"",
69  ]
70
71  cflags = [
72    "-fno-omit-frame-pointer",
73    "-g",
74    "-O0",
75    "-Wno-unused-variable",
76  ]
77
78  sources = [
79    "$SMS_MMS_SOURCE_DIR/test/fuzztest/common_fuzzer/addsmstoken_fuzzer.cpp",
80    "databasedsmsdelivery_fuzzer.cpp",
81  ]
82}
83
84###############################################################################
85group("fuzztest") {
86  testonly = true
87  deps = []
88  deps += [
89    # deps file
90    ":DataBasedSmsDeliveryFuzzTest",
91  ]
92}
93###############################################################################
94