• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2022 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
14#####################hydra-fuzz###################
15import("//build/config/features.gni")
16import("//build/test.gni")
17import("//foundation/distributeddatamgr/relational_store/relational_store.gni")
18
19##############################fuzztest##########################################
20ohos_fuzztest("RdbImplFuzzTest") {
21  module_out_path = "relational_store/relational_store"
22
23  include_dirs = [
24    "${relational_store_native_path}/rdb/include",
25    "${relational_store_innerapi_path}/rdb/include",
26    "//foundation/distributeddatamgr/kv_store/frameworks/innerkitsimpl/rdb",
27    "//foundation/distributeddatamgr/kv_store/frameworks/innerkitsimpl/rdb/include",
28    "//commonlibrary/c_utils/base/include",
29    "${common_tool_path}/",
30    "//third_party/sqlite/include",
31    "//foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/common/include/relational",
32    "//third_party/jsoncpp/include/json",
33    "//third_party/skia/third_party/externals/spirv-headers/tools/buildHeaders/jsoncpp/dist/json",
34    "//third_party/skia/third_party/externals/swiftshader/third_party/SPIRV-Headers/tools/buildHeaders/jsoncpp/dist/json",
35    "//third_party/jsoncpp/include/json",
36    "//third_party/grpc/src/core/lib/json",
37    "//foundation/systemabilitymgr/safwk/services/safwk/include",
38    "//foundation/systemabilitymgr/samgr/interfaces/innerkits/samgr_proxy/include",
39    "//base/security/dataclassification/interfaces/innerkits/datatransmitmgr/include",
40    "//third_party/json/single_include",
41    "//third_party/googletest/googletest/include/gtest",
42  ]
43
44  cflags = [
45    "-g",
46    "-O0",
47    "-Wno-unused-variable",
48    "-fno-omit-frame-pointer",
49  ]
50
51  fuzz_config_file =
52      "${relational_store_base_path}/test/native/rdb/fuzztest/rdbimpl_fuzzer"
53
54  sources = [ "rdbimpl_fuzzer.cpp" ]
55
56  deps = [
57    "//foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb:distributeddb",
58    "//foundation/distributeddatamgr/relational_store/interfaces/inner_api/rdb:native_rdb_static",
59    "//third_party/jsoncpp:jsoncpp",
60  ]
61
62  external_deps = [
63    "ability_base:zuri",
64    "ability_runtime:dataobs_manager",
65    "c_utils:utils",
66    "hilog:libhilog",
67    "ipc:ipc_core",
68  ]
69}
70
71###############################################################################
72group("fuzztest") {
73  testonly = true
74  deps = []
75  deps += [
76    # deps file
77    ":RdbImplFuzzTest",
78  ]
79}
80###############################################################################
81