1# Copyright (c) 2023 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 = "hiviewdfx/faultlogger/" 19 20 fuzz_config_file = 21 "$hiview_faultlogger/test/common/fuzztest/faultloggerservice_fuzzer" 22 include_dirs = [ 23 ".", 24 "$hiview_core", 25 "$hiview_faultlogger/service/", 26 "$hiview_faultlogger/service/sanitizer_collector/", 27 "$hiview_faultlogger/service/idl/include/", 28 ] 29 defines = [ "UNIT_TEST" ] 30 31 sources = [ 32 "$hiview_faultlogger/service/faultlog_database.cpp", 33 "$hiview_faultlogger/service/faultlog_formatter.cpp", 34 "$hiview_faultlogger/service/faultlog_manager.cpp", 35 "$hiview_faultlogger/service/faultlogger.cpp", 36 "$hiview_faultlogger/service/sanitizer_collector/zip_helper.cpp", 37 "faultlogger_service_fuzzer.cpp", 38 ] 39 40 deps = [ 41 "$hiview_base:hiviewbase_static_lib_for_tdd", 42 "$hiview_core:hiview_core", 43 "$hiview_plugin/faultlogger/common:faultlogger_common", 44 "$hiview_plugin/faultlogger/common:log_analyzer", 45 "$hiview_plugin/faultlogger/service:faultlogger_service_ability", 46 "$hiview_plugin/faultlogger/service/idl:faultlogger_service_ohos_common", 47 ] 48 49 external_deps = [ 50 "ability_base:want", 51 "bundle_framework:appexecfwk_base", 52 "bundle_framework:appexecfwk_core", 53 "c_utils:utils", 54 "hilog:libhilog", 55 "init:libbegetutil", 56 "ipc:ipc_single", 57 ] 58 resource_config_file = 59 "$hiview_faultlogger/test/common/resource/ohos_test.xml" 60} 61 62group("fuzztest") { 63 testonly = true 64 deps = [ ":FaultloggerServiceFuzzTest" ] 65} 66