• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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("ExtractAndExecuteScriptFuzzTest") {
24  module_out_path = module_output_path
25  fuzz_config_file =
26      "//base/update/updater/test/fuzztest/extractandexecutescript_fuzzer"
27  include_dirs = [
28    "//base/update/updater/utils/include",
29    "//base/update/updater/interfaces/kits/include/",
30    "//base/update/updater/services/include/package",
31    "//base/update/updater/services/package/pkg_manager",
32    "//base/update/updater/services/package/pkg_algorithm",
33    "//base/update/updater/services/include/log",
34    "//base/update/updater/services",
35    "//base/update/updater/services/ui",
36    "//base/update/updater/services/include",
37    "//base/update/updater/services/include/script",
38    "//base/update/updater/services/script/threadpool",
39    "//base/update/updater/services/script/script_manager",
40    "//base/update/updater/services/script/script_instruction",
41    "//third_party/bounds_checking_function/include",
42    "//third_party/openssl/include",
43  ]
44
45  deps = [
46    "//base/update/updater/interfaces/kits/misc_info:libmiscinfo",
47    "//base/update/updater/interfaces/kits/packages:libpackageExt",
48    "//base/update/updater/services/applypatch:libapplypatch",
49    "//base/update/updater/services/diffpatch/patch:libpatch",
50    "//base/update/updater/services/fs_manager:libfsmanager",
51    "//base/update/updater/services/log:libupdaterlog",
52    "//base/update/updater/services/package:libupdaterpackage",
53    "//base/update/updater/services/script:libupdaterscript",
54    "//base/update/updater/services/ui:libui",
55    "//base/update/updater/utils:libutils",
56    "//third_party/bounds_checking_function:libsec_static",
57    "//third_party/bzip2:libbz2",
58    "//third_party/libdrm:libdrm",
59    "//third_party/lz4:liblz4_static",
60    "//third_party/openssl:libcrypto_static",
61    "//third_party/openssl:ssl_source",
62    "//third_party/zlib:libz",
63  ]
64  external_deps += [ "c_utils:utils" ]
65
66  cflags = [
67    "-g",
68    "-O0",
69    "-Wno-unused-variable",
70    "-fno-omit-frame-pointer",
71  ]
72  sources = [ "extractandexecutescript_fuzzer.cpp" ]
73}
74
75###############################################################################
76group("fuzztest") {
77  testonly = true
78  deps = []
79  deps += [
80    # deps file
81    ":ExtractAndExecuteScriptFuzzTest",
82  ]
83}
84###############################################################################
85