1# Copyright (c) 2025 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("//base/hiviewdfx/faultloggerd/faultloggerd.gni") 15import("//build/config/features.gni") 16import("//build/test.gni") 17 18ohos_fuzztest("FaultloggerdServerFuzzTest") { 19 module_out_path = "faultloggerd/faultloggerd" 20 fuzz_config_file = "$faultloggerd_path/test/fuzztest/faultloggerdserver/faultloggerdserver_fuzzer" 21 sources = [ 22 "$faultloggerd_path/interfaces/innerkits/faultloggerd_client/faultloggerd_client.cpp", 23 "$faultloggerd_path/interfaces/innerkits/faultloggerd_client/faultloggerd_socket.cpp", 24 "$faultloggerd_path/test/fuzztest/faultloggerdserver/common/faultloggerd_test.cpp", 25 "faultloggerdserver_fuzzer.cpp", 26 ] 27 deps = [ 28 "$faultloggerd_frameworks_path/localhandler:dfx_local_handler_src", 29 "$faultloggerd_interfaces_path/innerkits/procinfo:libdfx_procinfo", 30 "$faultloggerd_path/common/dfxlog:dfx_hilog_base", 31 "$faultloggerd_path/common/dfxutil:dfx_util", 32 "$faultloggerd_path/common/trace:dfx_trace", 33 "$faultloggerd_path/services:faultloggerd_test_src", 34 ] 35 external_deps = [ 36 "bounds_checking_function:libsec_shared", 37 "c_utils:utils", 38 "ffrt:libffrt", 39 "hilog:libhilog_base", 40 "hisysevent:libhisysevent", 41 "hitrace:hitrace_meter", 42 "init:libbegetutil", 43 "jsoncpp:jsoncpp", 44 ] 45 include_dirs = [ 46 "$faultloggerd_interfaces_path/common", 47 "$faultloggerd_interfaces_path/innerkits/faultloggerd_client", 48 "$faultloggerd_interfaces_path/innerkits/faultloggerd_client/include", 49 "$faultloggerd_interfaces_path/innerkits/procinfo/include", 50 "$faultloggerd_path/common/dfxlog", 51 "$faultloggerd_path/services", 52 "$faultloggerd_path/test/fuzztest/faultloggerdserver/common/include", 53 "$faultloggerd_path/test/utils", 54 ] 55 defines = [ "FAULTLOGGERD_TEST" ] 56} 57