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/nativerdb" 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 "//third_party/sqlite/include", 30 "//foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/common/include/relational", 31 "//third_party/jsoncpp/include/json", 32 "//third_party/skia/third_party/externals/spirv-headers/tools/buildHeaders/jsoncpp/dist/json", 33 "//third_party/skia/third_party/externals/swiftshader/third_party/SPIRV-Headers/tools/buildHeaders/jsoncpp/dist/json", 34 "//third_party/jsoncpp/include/json", 35 "//third_party/grpc/src/core/lib/json", 36 "//foundation/systemabilitymgr/safwk/services/safwk/include", 37 "//foundation/systemabilitymgr/samgr/interfaces/innerkits/samgr_proxy/include", 38 "//base/security/dataclassification/interfaces/innerkits/datatransmitmgr/include", 39 "//third_party/json/single_include", 40 "//third_party/googletest/googletest/include/gtest", 41 ] 42 43 cflags = [ 44 "-g", 45 "-O0", 46 "-Wno-unused-variable", 47 "-fno-omit-frame-pointer", 48 ] 49 50 fuzz_config_file = 51 "${relational_store_base_path}/test/native/rdb/fuzztest/rdbimpl_fuzzer" 52 53 sources = [ "rdbimpl_fuzzer.cpp" ] 54 55 deps = [ 56 "//foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb:distributeddb", 57 "//third_party/jsoncpp:jsoncpp", 58 ] 59 60 external_deps = [ 61 "c_utils:utils", 62 "hilog_native:libhilog", 63 "ipc:ipc_core", 64 "relational_store:native_rdb", 65 ] 66} 67 68############################################################################### 69group("fuzztest") { 70 testonly = true 71 deps = [] 72 deps += [ 73 # deps file 74 ":RdbImplFuzzTest", 75 ] 76} 77############################################################################### 78