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 14import("//build/config/features.gni") 15import("//build/ohos.gni") 16import("//build/test.gni") 17import("//foundation/filemanagement/dfs_service/distributedfile.gni") 18 19ohos_fuzztest("DaemonStubFuzzTest") { 20 module_out_path = "distributed_file_system/dfs_service_deamon" 21 fuzz_config_file = "${distributedfile_path}/test/fuzztest/daemonstub_fuzzer" 22 include_dirs = [ 23 "${distributedfile_path}/services/distributedfiledaemon/include", 24 "${distributedfile_path}/services/distributedfiledaemon/include/ipc", 25 ] 26 cflags = [ 27 "-g", 28 "-O0", 29 "-Wno-unused-variable", 30 "-fno-omit-frame-pointer", 31 ] 32 sources = [ 33 "${distributedfile_path}/services/distributedfiledaemon/src/ipc/daemon_stub.cpp", 34 "${distributedfile_path}/test/fuzztest/daemonstub_fuzzer/daemonstub_fuzzer.cpp", 35 ] 36 defines = [ "DFS_LOG_TAG = \"dfs_service\"" ] 37 deps = [ 38 "${services_path}/distributedfiledaemon:distributed_file_daemon_kit_inner", 39 "${utils_path}:libdistributedfileutils", 40 ] 41 42 external_deps = [ 43 "access_token:libaccesstoken_sdk", 44 "access_token:libnativetoken", 45 "access_token:libtoken_setproc", 46 "c_utils:utils", 47 "device_manager:devicemanagersdk", 48 "hilog:libhilog", 49 "ipc:ipc_single", 50 "safwk:system_ability_fwk", 51 "samgr:samgr_proxy", 52 ] 53} 54 55group("fuzztest") { 56 testonly = true 57 deps = [ ":DaemonStubFuzzTest" ] 58} 59