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