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("UdmfServiceFuzzTest") { 20 module_out_path = "datamgr_service/datamgr_service" 21 22 include_dirs = [ 23 "${udmf_path}/framework/common", 24 "${udmf_path}/interfaces/innerkits/common", 25 "${udmf_path}/interfaces/innerkits/data", 26 "${data_service_path}/framework/include", 27 "${data_service_path}/service/udmf/lifecycle", 28 "${data_service_path}/service/udmf/permission", 29 "${data_service_path}/service/udmf/preprocess", 30 "${data_service_path}/service/udmf/store", 31 "${data_service_path}/service/udmf", 32 "${kv_store_path}/frameworks/common", 33 ] 34 35 fuzz_config_file = 36 "${data_service_path}/service/test/fuzztest/udmfservice_fuzzer" 37 38 cflags = [ 39 "-g", 40 "-O0", 41 "-Wno-unused-variable", 42 "-fno-omit-frame-pointer", 43 ] 44 45 sources = [ "udmfservice_fuzzer.cpp" ] 46 47 deps = [ 48 "${data_service_path}/framework:distributeddatasvcfwk", 49 "${data_service_path}/service/udmf:udmf_server", 50 ] 51 52 external_deps = [ 53 "ability_base:zuri", 54 "ability_runtime:uri_permission_mgr", 55 "access_token:libaccesstoken_sdk", 56 "bundle_framework:appexecfwk_core", 57 "c_utils:utils", 58 "hilog:libhilog", 59 "ipc:ipc_core", 60 "kv_store:distributeddata_inner", 61 "kv_store:distributeddata_mgr", 62 "kv_store:distributeddb", 63 "udmf:udmf_client", 64 ] 65} 66 67############################################################################### 68group("fuzztest") { 69 testonly = true 70 71 deps = [ ":UdmfServiceFuzzTest" ] 72} 73############################################################################### 74