# 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("KvStoreDiskSizeFuzzTest") { module_out_path = "datamgr_service/distributeddatafwk" include_dirs = [ "//foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/test/fuzztest/common", "//foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/test/unittest/common/common", "//foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/test/unittest/common/syncer", "//foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/test/unittest/common/storage", "//foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/include", "//foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/interfaces/include", "//foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/interfaces/src", "//foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/storage/include", "//foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/storage/src", "//foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/storage/src/sqlite", "//foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/storage/src/multiver", "//foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/common/include", "//foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/common/src", "//foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/communicator/include", "//foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/communicator/src", "//foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/syncer/include", "//foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/syncer/src", "//commonlibrary/c_utils/base/include", "//third_party/sqlite/include", "//foundation/distributeddatamgr/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", ] fuzz_config_file = "//foundation/distributeddatamgr/datamgr_service/test/fuzztest/kvstoredisksize_fuzzer" cflags = [ "-g", "-O0", "-Wno-unused-variable", "-fno-omit-frame-pointer", ] sources = [ "//foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/common/src/db_common.cpp", "//foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/common/src/log_print.cpp", "//foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/common/src/platform_specific.cpp", "//foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/test/fuzztest/common/distributeddb_tools_test.cpp", "//foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/test/unittest/common/common/distributeddb_data_generate_unit_test.cpp", "kvstoredisksize_fuzzer.cpp", ] 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", ] deps = [ "//foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb:distributeddb", "//third_party/jsoncpp:jsoncpp", "//third_party/openssl:libcrypto_shared", ] external_deps = [ "c_utils:utils", "hilog:libhilog", ] } ############################################################################### group("fuzztest") { testonly = true deps = [] deps += [ # deps file ":KvStoreDiskSizeFuzzTest", ] } ###############################################################################