1# Copyright (c) 2024 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/ohos.gni") 17import("//build/test.gni") 18import("//foundation/filemanagement/dfs_service/distributedfile.gni") 19ohos_fuzztest("CloudSyncServiceStubFuzzTest") { 20 module_out_path = "dfs_service/dfs_service" 21 fuzz_config_file = 22 "${distributedfile_path}/test/fuzztest/cloudsyncservicestub_fuzzer" 23 include_dirs = [ 24 "${distributedfile_path}/test/fuzztest/fuzz_common", 25 "${innerkits_native_path}/cloudsync_kit_inner", 26 "${services_path}/cloudsyncservice/include", 27 "${services_path}/cloudsyncservice/include/cycle_task", 28 "${services_path}/cloudsyncservice/include/cycle_task/tasks", 29 "${services_path}/cloudsyncservice/include/data_sync", 30 "${services_path}/cloudsyncservice/include/data_sync/cloud_disk_data_sync", 31 "${services_path}/cloudsyncservice/include/data_sync/gallery_data_sync", 32 "${services_path}/cloudsyncservice/include/ipc", 33 "${services_path}/cloudsyncservice/include/sync_rule", 34 "${services_path}/cloudsyncservice/include/transport", 35 "${services_path}/cloudsyncservice/include/transport/softbus", 36 "${utils_path}/dentry/include", 37 ] 38 cflags = [ 39 "-g", 40 "-O0", 41 "-Wno-unused-variable", 42 "-fno-omit-frame-pointer", 43 "-flto", 44 "-fvisibility=hidden", 45 "-Dprivate=public", 46 "--coverage", 47 ] 48 ldflags = [ 49 "-flto", 50 "--coverage", 51 ] 52 sources = [ 53 "${distributedfile_path}/services/cloudsyncservice/src/ipc/cloud_sync_service_stub.cpp", 54 "${distributedfile_path}/test/fuzztest/cloudsyncservicestub_fuzzer/cloudsyncservicestub_fuzzer.cpp", 55 ] 56 57 deps = [ 58 "${innerkits_native_path}/cloud_file_kit_inner:cloudfile_kit", 59 "${services_path}/cloudsyncservice:cloudsync_sa_static", 60 "${utils_path}:libdistributedfileutils_lite", 61 ] 62 63 external_deps = [ 64 "ability_base:want", 65 "access_token:libaccesstoken_sdk", 66 "access_token:libnativetoken_shared", 67 "access_token:libtokensetproc_shared", 68 "c_utils:utils", 69 "device_manager:devicemanagersdk", 70 "ffrt:libffrt", 71 "hilog:libhilog", 72 "ipc:ipc_single", 73 "safwk:system_ability_fwk", 74 "samgr:samgr_proxy", 75 ] 76} 77 78group("fuzztest") { 79 testonly = true 80 deps = [] 81} 82