1# Copyright (c) 2023-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. 13import("//base/hiviewdfx/hiview/hiview.gni") 14import("//build/config/features.gni") 15import("//build/test.gni") 16 17ohos_fuzztest("FaultloggerServiceFuzzTest") { 18 module_out_path = "hiview/hiview/faultlogger" 19 20 fuzz_config_file = 21 "$hiview_faultlogger/test/common/fuzztest/faultloggerservice_fuzzer" 22 include_dirs = [ 23 ".", 24 "../common/include", 25 "$hiview_core", 26 "$hiview_faultlogger/service/", 27 "$hiview_faultlogger/service/fault_file/", 28 "$hiview_faultlogger/service/sanitizer_collector/", 29 "$hiview_faultlogger/service/idl/include/", 30 ] 31 32 sources = [ "faultlogger_service_fuzzer.cpp" ] 33 34 cflags = [ "-Dprivate=public" ] 35 36 deps = [ 37 "$hiview_base:hiviewbase_static_lib_for_tdd", 38 "$hiview_base/event_publish:hiview_event_publish", 39 "$hiview_core:hiview_core", 40 "$hiview_framework/native/unified_collection:ucollection_source", 41 "$hiview_plugin/faultlogger/common:faultlogger_common", 42 "$hiview_plugin/faultlogger/common:log_analyzer", 43 "$hiview_plugin/faultlogger/service:faultlogger_service_fuzz_src", 44 "$hiview_plugin/faultlogger/service/idl:faultlogger_service_ohos_common", 45 ] 46 47 external_deps = [ 48 "ability_base:want", 49 "access_token:libaccesstoken_sdk", 50 "bundle_framework:appexecfwk_base", 51 "bundle_framework:appexecfwk_core", 52 "c_utils:utils", 53 "ffrt:libffrt", 54 "hilog:libhilog", 55 "init:libbegetutil", 56 "ipc:ipc_single", 57 "safwk:system_ability_fwk", 58 ] 59 resource_config_file = 60 "$hiview_faultlogger/test/common/resource/ohos_test.xml" 61} 62 63group("fuzztest") { 64 testonly = true 65 deps = [ ":FaultloggerServiceFuzzTest" ] 66} 67