• 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",
36    "access_token:libtoken_setproc",
37    "c_utils:utils",
38    "ffrt:libffrt",
39    "hilog:libhilog",
40  ]
41  defines = [
42    "TELEPHONY_LOG_TAG = \"SmsMmsFuzzTest\"",
43    "LOG_DOMAIN = 0xD000F00",
44  ]
45
46  cflags = [
47    "-g",
48    "-O0",
49    "-Wno-unused-variable",
50    "-fno-omit-frame-pointer",
51    "-flto",
52    "-fsanitize=cfi",
53    "-fsanitize-cfi-cross-dso",
54    "-fvisibility=hidden",
55  ]
56
57  ldflags = [
58    "-flto",
59    "-fsanitize=cfi",
60    "-fsanitize-cfi-cross-dso",
61  ]
62
63  sources = [
64    "$SMS_MMS_SOURCE_DIR/test/fuzztest/common_fuzzer/addsmstoken_fuzzer.cpp",
65    "smspdubuffer_fuzzer.cpp",
66  ]
67}
68
69###############################################################################
70group("fuzztest") {
71  testonly = true
72  deps = []
73  deps += [
74    # deps file
75    ":SmsPduBufferFuzzTest",
76  ]
77}
78###############################################################################
79