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. 13import("//base/hiviewdfx/hiview/hiview.gni") 14import("//build/test.gni") 15module_output_path = "hiview/faultlogger/smart_parser" 16 17ohos_unittest("SmartParserUnitTest") { 18 module_out_path = module_output_path 19 20 defines = [ "UNIT_TEST" ] 21 22 configs = [ "$hiview_root/utility/smart_parser:smart_parser_config" ] 23 24 cflags = [ "-Dprivate=public" ] 25 sources = [ 26 "unittest/cpp_crash_unittest.cpp", 27 "unittest/hw_watchdog_unittest.cpp", 28 "unittest/lpm3_exception_unittest.cpp", 29 "unittest/panic_unittest.cpp", 30 "unittest/iom3_exception_unittest.cpp", 31 ] 32 33 deps = [ 34 "$hiview_base:hiviewbase_static_lib_for_tdd", 35 "$hiview_root/utility/common_utils:hiview_reliability_common_utils", 36 "$hiview_root/utility/smart_parser:smart_parser", 37 ] 38 39 external_deps = [ 40 "c_utils:utils", 41 "googletest:gtest_main", 42 "hilog:libhilog", 43 ] 44 45 resource_config_file = 46 "//base/hiviewdfx/hiview/utility/test/resource/ohos_test.xml" 47} 48 49group("unittest") { 50 testonly = true 51 deps = [ ":SmartParserUnitTest" ] 52} 53