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("RebootAndInstallUpgradePackageFuzzTest") { 25 defines = [ 26 "UPDATER_UT", 27 "BUILD_OHOS", 28 "HDC_DEBUG", 29 "HDC_SUPPORT_FLASHD", 30 "HARMONY_PROJECT", 31 ] 32 33 #configs = [ "${updater_path}/test/unittest:utest_config" ] 34 module_out_path = module_output_path 35 fuzz_config_file = 36 "${updater_path}/test/fuzztest/rebootandinstallupgradepackage_fuzzer" 37 include_dirs = [ 38 "${updater_path}/interfaces/kits/include", 39 "${updater_path}/services/include/log", 40 "${updater_path}/utils/include", 41 "//third_party/bounds_checking_function/include", 42 ] 43 44 deps = [ 45 "${updater_path}/interfaces/kits/misc_info:libmiscinfo", 46 "${updater_path}/interfaces/kits/updaterkits:libupdaterkits", 47 "${updater_path}/services/log:libupdaterlog", 48 "${updater_path}/utils:libutils", 49 "//third_party/bounds_checking_function:libsec_static", 50 ] 51 52 external_deps = [ 53 "c_utils:utils", 54 "init:libbegetutil", 55 ] 56 57 cflags = [ 58 "-g", 59 "-O0", 60 "-Wno-unused-variable", 61 "-fno-omit-frame-pointer", 62 ] 63 sources = [ 64 "${updater_path}/interfaces/kits/updaterkits/updaterkits.cpp", 65 "rebootandinstallupgradepackage_fuzzer.cpp", 66 ] 67} 68