# Copyright (c) 2022 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. #####################hydra-fuzz################### import("//build/config/features.gni") import("//build/test.gni") import("//foundation/distributeddatamgr/relational_store/relational_store.gni") ##############################fuzztest########################################## ohos_fuzztest("RdbImplFuzzTest") { module_out_path = "relational_store/relational_store" include_dirs = [ "${relational_store_native_path}/rdb/include", "${relational_store_innerapi_path}/rdb/include", "${distributeddata_base_path}/kv_store/frameworks/innerkitsimpl/rdb", "${distributeddata_base_path}/kv_store/frameworks/innerkitsimpl/rdb/include", "${common_tool_path}/", "//third_party/sqlite/include", "${distributeddata_base_path}/kv_store/frameworks/libs/distributeddb/common/include/relational", "//third_party/jsoncpp/include/json", "//third_party/skia/third_party/externals/spirv-headers/tools/buildHeaders/jsoncpp/dist/json", "//third_party/skia/third_party/externals/swiftshader/third_party/SPIRV-Headers/tools/buildHeaders/jsoncpp/dist/json", "//third_party/jsoncpp/include/json", "//third_party/grpc/src/core/lib/json", "${foundation_systemabilitymgr_path}/safwk/services/safwk/include", "${foundation_systemabilitymgr_path}/samgr/interfaces/innerkits/samgr_proxy/include", "${base_security_dataclassification_path}/interfaces/innerkits/datatransmitmgr/include", "//third_party/json/single_include", "//third_party/googletest/googletest/include/gtest", ] cflags = [ "-g", "-O0", "-Wno-unused-variable", "-fno-omit-frame-pointer", ] fuzz_config_file = "${relational_store_base_path}/test/native/rdb/fuzztest/rdbimpl_fuzzer" sources = [ "rdbimpl_fuzzer.cpp" ] deps = [ "${distributeddata_base_path}/kv_store/frameworks/libs/distributeddb:distributeddb", "${distributeddata_base_path}/relational_store/interfaces/inner_api/rdb:native_rdb_static", "//third_party/jsoncpp:jsoncpp", ] external_deps = [ "ability_base:zuri", "ability_runtime:dataobs_manager", "c_utils:utils", "hilog:libhilog", "ipc:ipc_core", ] } ############################################################################### group("fuzztest") { testonly = true deps = [] deps += [ # deps file ":RdbImplFuzzTest", ] } ###############################################################################