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
14module_output_path = "updater/sys_installer"
15
16import("//base/update/sys_installer/sys_installer_default_cfg.gni")
17
18#####################hydra-fuzz###################
19import("//build/config/features.gni")
20import("//build/test.gni")
21sys_installer_path = rebase_path("${sys_installer_absolutely_path}", ".")
22
23##############################fuzztest##########################################
24ohos_fuzztest("SysInstallerFuzzTest") {
25  module_out_path = module_output_path
26  fuzz_config_file = "${sys_installer_path}/test/fuzztest/sysinstaller_fuzzer"
27  include_dirs = [
28    "${sys_installer_path}/interfaces/inner_api/include",
29    "${sys_installer_path}/interfaces/innerkits/ipc_client/include/",
30  ]
31
32  deps = [
33    "${sys_installer_path}/interfaces/innerkits/ipc_client:libsysinstallerkits",
34  ]
35
36  external_deps = [
37    "bounds_checking_function:libsec_static",
38    "c_utils:utils",
39    "hilog:libhilog",
40    "init:libbegetutil",
41    "ipc:ipc_core",
42    "safwk:system_ability_fwk",
43    "samgr:samgr_proxy",
44    "updater:libupdaterlog",
45    "updater:libutils",
46  ]
47
48  cflags = [
49    "-g",
50    "-O0",
51    "-Wno-unused-variable",
52    "-fno-omit-frame-pointer",
53  ]
54  sources = [ "sys_installer_fuzzer.cpp" ]
55}
56