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_start_updater_proc" 15 16#####################hydra-fuzz################### 17import("//build/config/features.gni") 18import("//build/test.gni") 19 20##############################fuzztest########################################## 21ohos_fuzztest("UpdaterStartUpdaterProcFuzzTest") { 22 module_out_path = module_output_path 23 24 include_dirs = [ 25 "//base/update/updater/utils/include", 26 "//base/update/updater/interfaces/kits/include/", 27 "//base/update/updater/services/include/updater", 28 "//base/update/updater/services/package/pkg_manager", 29 "//base/update/updater/services/package/pkg_algorithm", 30 "//base/update/updater/services/include/log", 31 "//base/update/updater/services", 32 "//base/update/updater/services/include", 33 "//base/update/updater/services/include/package", 34 "//base/update/updater/services/ui", 35 "//third_party/openssl/include", 36 ] 37 38 deps = [ 39 "//base/update/updater/interfaces/kits/misc_info:libmiscinfo", 40 "//base/update/updater/interfaces/kits/packages:libpackageExt", 41 "//base/update/updater/services/applypatch:libapplypatch", 42 "//base/update/updater/services/diffpatch/patch:libpatch", 43 "//base/update/updater/services/fs_manager:libfsmanager", 44 "//base/update/updater/services/log:libupdaterlog", 45 "//base/update/updater/services/package:libupdaterpackage", 46 "//base/update/updater/services/ui:libui", 47 "//base/update/updater/utils:libutils", 48 "//drivers/peripheral/input/hal:hdi_input", 49 "//third_party/bounds_checking_function:libsec_static", 50 "//third_party/bzip2:libbz2", 51 "//third_party/libdrm:libdrm", 52 "//third_party/libpng:libpng", 53 "//third_party/lz4:liblz4_static", 54 "//third_party/openssl:libcrypto_static", 55 "//third_party/openssl:ssl_source", 56 "//third_party/zlib:libz", 57 ] 58 59 cflags = [ 60 "-g", 61 "-O0", 62 "-Wno-unused-variable", 63 "-fno-omit-frame-pointer", 64 ] 65 sources = [ 66 "//base/update/updater/services/ui/updater_ui.cpp", 67 "//base/update/updater/services/updater.cpp", 68 "//base/update/updater/services/updater_main.cpp", 69 "UpdaterStartUpdaterProc_fuzzer.cpp", 70 ] 71} 72 73############################################################################### 74group("fuzztest") { 75 testonly = true 76 deps = [] 77 deps += [ 78 # deps file 79 ":UpdaterStartUpdaterProcFuzzTest", 80 ] 81} 82############################################################################### 83