188edb362Sopenharmony_ci# Copyright (c) 2023 Huawei Device Co., Ltd.
288edb362Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License");
388edb362Sopenharmony_ci# you may not use this file except in compliance with the License.
488edb362Sopenharmony_ci# You may obtain a copy of the License at
588edb362Sopenharmony_ci#
688edb362Sopenharmony_ci#     http://www.apache.org/licenses/LICENSE-2.0
788edb362Sopenharmony_ci#
888edb362Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software
988edb362Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS,
1088edb362Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1188edb362Sopenharmony_ci# See the License for the specific language governing permissions and
1288edb362Sopenharmony_ci# limitations under the License.
1388edb362Sopenharmony_ci
1488edb362Sopenharmony_cimodule_output_path = "updater/sys_installer"
1588edb362Sopenharmony_ci
1688edb362Sopenharmony_ciimport("//base/update/sys_installer/sys_installer_default_cfg.gni")
1788edb362Sopenharmony_ci
1888edb362Sopenharmony_ci#####################hydra-fuzz###################
1988edb362Sopenharmony_ciimport("//build/config/features.gni")
2088edb362Sopenharmony_ciimport("//build/test.gni")
2188edb362Sopenharmony_cisys_installer_path = rebase_path("${sys_installer_absolutely_path}", ".")
2288edb362Sopenharmony_ci
2388edb362Sopenharmony_ci##############################fuzztest##########################################
2488edb362Sopenharmony_ciohos_fuzztest("SysInstallerFuzzTest") {
2588edb362Sopenharmony_ci  module_out_path = module_output_path
2688edb362Sopenharmony_ci  fuzz_config_file = "${sys_installer_path}/test/fuzztest/sysinstaller_fuzzer"
2788edb362Sopenharmony_ci  include_dirs = [
2888edb362Sopenharmony_ci    "${sys_installer_path}/interfaces/inner_api/include",
2988edb362Sopenharmony_ci    "${sys_installer_path}/interfaces/innerkits/ipc_client/include/",
3088edb362Sopenharmony_ci  ]
3188edb362Sopenharmony_ci
3288edb362Sopenharmony_ci  deps = [
3388edb362Sopenharmony_ci    "${sys_installer_path}/interfaces/innerkits/ipc_client:libsysinstallerkits",
3488edb362Sopenharmony_ci  ]
3588edb362Sopenharmony_ci
3688edb362Sopenharmony_ci  external_deps = [
3788edb362Sopenharmony_ci    "bounds_checking_function:libsec_static",
3888edb362Sopenharmony_ci    "c_utils:utils",
3988edb362Sopenharmony_ci    "hilog:libhilog",
4088edb362Sopenharmony_ci    "init:libbegetutil",
4188edb362Sopenharmony_ci    "ipc:ipc_core",
4288edb362Sopenharmony_ci    "safwk:system_ability_fwk",
4388edb362Sopenharmony_ci    "samgr:samgr_proxy",
4488edb362Sopenharmony_ci    "updater:libupdaterlog",
4588edb362Sopenharmony_ci    "updater:libutils",
4688edb362Sopenharmony_ci  ]
4788edb362Sopenharmony_ci
4888edb362Sopenharmony_ci  cflags = [
4988edb362Sopenharmony_ci    "-g",
5088edb362Sopenharmony_ci    "-O0",
5188edb362Sopenharmony_ci    "-Wno-unused-variable",
5288edb362Sopenharmony_ci    "-fno-omit-frame-pointer",
5388edb362Sopenharmony_ci  ]
5488edb362Sopenharmony_ci  sources = [ "sys_installer_fuzzer.cpp" ]
5588edb362Sopenharmony_ci}
56