• 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###################
15import("//build/config/features.gni")
16import("//build/ohos.gni")
17import("//build/test.gni")
18SMS_MMS_SOURCE_DIR = "../../../"
19
20##############################fuzztest##########################################
21ohos_fuzztest("SmsPduBufferFuzzTest") {
22  module_output_path = "sms_mms/sms_mms"
23  module_out_path = module_output_path
24  fuzz_config_file = "$SMS_MMS_SOURCE_DIR/test/fuzztest/smspdubuffer_fuzzer"
25
26  include_dirs = [
27    "$SMS_MMS_SOURCE_DIR/services/include",
28    "$SMS_MMS_SOURCE_DIR/test/fuzztest/common_fuzzer",
29  ]
30
31  deps = [ "$SMS_MMS_SOURCE_DIR:tel_sms_mms" ]
32
33  external_deps = [
34    "access_token:libaccesstoken_sdk",
35    "access_token:libnativetoken_shared",
36    "access_token:libtoken_setproc",
37    "c_utils:utils",
38    "ffrt:libffrt",
39    "hilog:libhilog",
40    "safwk:system_ability_fwk",
41  ]
42  defines = [
43    "TELEPHONY_LOG_TAG = \"SmsMmsFuzzTest\"",
44    "LOG_DOMAIN = 0xD000F00",
45  ]
46
47  cflags = [
48    "-g",
49    "-O0",
50    "-Wno-unused-variable",
51    "-fno-omit-frame-pointer",
52    "-flto",
53    "-fsanitize=cfi",
54    "-fsanitize-cfi-cross-dso",
55    "-fvisibility=hidden",
56  ]
57
58  ldflags = [
59    "-flto",
60    "-fsanitize=cfi",
61    "-fsanitize-cfi-cross-dso",
62  ]
63
64  sources = [
65    "$SMS_MMS_SOURCE_DIR/test/fuzztest/common_fuzzer/addsmstoken_fuzzer.cpp",
66    "smspdubuffer_fuzzer.cpp",
67  ]
68}
69
70###############################################################################
71group("fuzztest") {
72  testonly = true
73  deps = []
74  deps += [
75    # deps file
76    ":SmsPduBufferFuzzTest",
77  ]
78}
79###############################################################################
80