# 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") ##############################fuzztest########################################## ohos_fuzztest("SchemaQueryFuzzTest") { module_out_path = "datamgr_service/distributeddb" include_dirs = [ "//foundation/distributeddatamgr/kv_store/interfaces/innerkits/distributeddata/include", "//commonlibrary/c_utils/base/include", "//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", "//third_party/sqlite/include", "//third_party/googletest/googletest/include/gtest", ] sources = [ "schemaquery_fuzzer.cpp" ] cflags = [ "-g", "-O0", "-Wno-unused-variable", "-fno-omit-frame-pointer", ] fuzz_config_file = "//foundation/distributeddatamgr/datamgr_service/services/distributeddataservice/test/fuzztest/schemaquery_fuzzer" deps = [ "//foundation/distributeddatamgr/datamgr_service/services/distributeddataservice/adapter:distributeddata_adapter", "//foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb:distributeddb", "//foundation/distributeddatamgr/kv_store/interfaces/innerkits/distributeddata:distributeddata_inner", "//third_party/jsoncpp:jsoncpp", "//third_party/openssl:libcrypto_shared", ] defines = [ "SQLITE_ENABLE_SNAPSHOT", "_LARGEFILE64_SOURCE", "_FILE_OFFSET_BITS=64", "SQLITE_HAS_CODEC", "SQLITE_ENABLE_JSON1", "USING_HILOG_LOGGER", "USE_SQLITE_SYMBOLS", "USING_DB_JSON_EXTRACT_AUTOMATICALLY", "LOW_LEVEL_MEM_DEV", "JSONCPP_USE_BUILDER", "OMIT_FLATBUFFER", "RELATIONAL_STORE", "SQLITE_DISTRIBUTE_RELATIONAL", "OPENSSL_SUPPRESS_DEPRECATED", ] external_deps = [ "c_utils:utils", "hilog:libhilog", "ipc:ipc_core", ] } ############################################################################### group("fuzztest") { testonly = true deps = [] deps += [ # deps file ":SchemaQueryFuzzTest", ] } ###############################################################################