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 = "dfs_service/dfs_service_daemon" 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 "app_file_service:remote_file_share_native", 47 "cJSON:cjson_static", 48 "c_utils:utils", 49 "device_manager:devicemanagersdk", 50 "hilog:libhilog", 51 "hisysevent:libhisysevent", 52 "ipc:ipc_single", 53 "safwk:system_ability_fwk", 54 "selinux_adapter:librestorecon", 55 "samgr:samgr_proxy", 56 ] 57} 58 59group("fuzztest") { 60 testonly = true 61 deps = [ ":DaemonStubFuzzTest" ] 62} 63