• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021 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
14module_output_path = "updater/updater"
15
16import("//base/update/updater/updater_default_cfg.gni")
17
18#####################hydra-fuzz###################
19import("//build/config/features.gni")
20import("//build/test.gni")
21updater_path = rebase_path("${updater_absolutely_path}", ".")
22
23##############################fuzztest##########################################
24ohos_fuzztest("UpdaterFormatPartitionFuzzTest") {
25  module_out_path = module_output_path
26  resource_config_file =
27      "${updater_path}/test/fuzztest/fuzz_src_data/ohos_test.xml"
28  fuzz_config_file =
29      "${updater_path}/test/fuzztest/UpdaterFormatPartition_fuzzer"
30
31  include_dirs = [
32    "${updater_path}/utils/include",
33    "${updater_path}/interfaces/kits/include/",
34    "${updater_path}/services/include/package",
35    "${updater_path}/services/include/fs_manager",
36    "${updater_path}/services/package/pkg_manager",
37    "${updater_path}/services/include/log",
38    "${updater_path}/services",
39    "${updater_path}/services/ui",
40    "${updater_path}/services/include",
41    "${updater_path}/test/fuzztest/utils",
42  ]
43
44  deps = [
45    "${updater_path}/services/fs_manager:libfsmanager",
46    "${updater_path}/services/log:libupdaterlog",
47  ]
48
49  external_deps = [ "init:libbegetutil" ]
50
51  cflags = [
52    "-g",
53    "-O0",
54    "-Wno-unused-variable",
55    "-fno-omit-frame-pointer",
56  ]
57  sources = [
58    "${updater_path}/services/fs_manager/mount.cpp",
59    "${updater_path}/test/fuzztest/utils/fuzz_utils.cpp",
60    "UpdaterFormatPartition_fuzzer.cpp",
61  ]
62}
63