1# Copyright (c) 2023 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##############################hydra-fuzz########################################
14import("//build/config/features.gni")
15import("//build/test.gni")
16import("//foundation/distributeddatamgr/datamgr_service/datamgr_service.gni")
17
18##############################fuzztest##########################################
19ohos_fuzztest("RdbResultSetStubFuzzTest") {
20  module_out_path = "datamgr_service/datamgr_service"
21
22  include_dirs = [
23    "${data_service_path}/adapter/include",
24    "${data_service_path}/app/src",
25    "${data_service_path}/framework/include",
26    "${data_service_path}/service/rdb",
27    "${data_service_path}/service/common",
28    "${kv_store_common_path}",
29    "${kv_store_path}/frameworks/innerkitsimpl/distributeddatafwk/include",
30    "${kv_store_path}/frameworks/innerkitsimpl/distributeddatasvc/include",
31    "${kv_store_path}/frameworks/innerkitsimpl/kvdb/include",
32    "${kv_store_distributeddb_path}",
33    "${kv_store_distributeddb_path}/include/",
34    "${kv_store_distributeddb_path}/interfaces/include/",
35    "${kv_store_distributeddb_path}/interfaces/include/relational",
36    "${relational_store_path}/interfaces/inner_api/cloud_data/include",
37    "${relational_store_path}/interfaces/inner_api/rdb/include",
38    "${relational_store_path}/interfaces/inner_api/common_type/include",
39    "//third_party/json/single_include",
40  ]
41
42  fuzz_config_file =
43      "${data_service_path}/service/test/fuzztest/rdbresultsetstub_fuzzer"
44
45  cflags = [
46    "-g",
47    "-O0",
48    "-Wno-unused-variable",
49    "-fno-omit-frame-pointer",
50  ]
51
52  sources = [
53    "${data_service_path}/service/common/value_proxy.cpp",
54    "${data_service_path}/service/rdb/rdb_result_set_impl.cpp",
55    "${data_service_path}/service/rdb/rdb_result_set_stub.cpp",
56    "rdbresultsetstub_fuzzer.cpp",
57  ]
58
59  deps = [
60    "${data_service_path}/adapter:distributeddata_adapter",
61    "${data_service_path}/adapter/utils:distributeddata_utils_static",
62    "${data_service_path}/framework:distributeddatasvcfwk",
63    "${kv_store_distributeddb_path}:distributeddb",
64    "${relational_store_inner_api_path}:native_rdb_static",
65  ]
66
67  external_deps = [
68    "ability_base:want",
69    "ability_base:zuri",
70    "ability_runtime:ability_manager",
71    "ability_runtime:dataobs_manager",
72    "access_token:libaccesstoken_sdk",
73    "access_token:libtokenid_sdk",
74    "c_utils:utils",
75    "device_auth:deviceauth_sdk",
76    "device_manager:devicemanagersdk",
77    "hilog:libhilog",
78    "huks:libhukssdk",
79    "ipc:ipc_core",
80    "kv_store:distributeddata_inner",
81    "kv_store:distributeddata_mgr",
82    "relational_store:native_rdb",
83  ]
84}
85
86###############################################################################
87group("fuzztest") {
88  testonly = true
89
90  deps = [ ":RdbResultSetStubFuzzTest" ]
91}
92###############################################################################
93