# Copyright (c) 2021~2022 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import("//base/hiviewdfx/hiview/hiview.gni") import("//build/test.gni") module_output_path = "hiview/hiview/freezedetector" config("unittest_config") { include_dirs = [ "./unittest/common/", "$hiview_plugin/freeze_detector", ] cflags_cc = [ "-D__UNITTEST__", "-D__HIVIEW_OHOS__", ] } ohos_unittest("FreezeDetectorTest") { module_out_path = module_output_path configs = [ ":unittest_config" ] sources = [ "unittest/common/freeze_detector_test.cpp" ] deps = [ "$hiview_base:hiviewbase_static_lib_for_tdd", "$hiview_core:hiview_core_for_test", "$hiview_eventlogger:eventlogger", "$hiview_plugin/freeze_detector:freeze_detector", ] external_deps = [ "ffrt:libffrt", "googletest:gtest_main", "hilog:libhilog", "libxml2:libxml2", ] resource_config_file = "$hiview_plugin/freeze_detector/test/resource/ohos_test.xml" } ohos_unittest("FreezeDetectorUnittest") { module_out_path = module_output_path configs = [ ":unittest_config" ] include_dirs = [ "./unittest/common/", "$hiview_plugin/freeze_detector", "//base/hiviewdfx/hiview/base/include", "//base/hiviewdfx/hiview/utility/smart_parser", "//base/hiviewdfx/hiview/plugins/faultlogger/interfaces/cpp/innerkits/include", ] sources = [ "unittest/common/freeze_detector_unittest.cpp" ] external_deps = [ "hilog:libhilog", "hiview:libfaultlogger", "libxml2:libxml2", "power_manager:powermgr_client", ] deps = [ "$hiview_base:hiviewbase_static_lib_for_tdd", "$hiview_plugin/freeze_detector:freeze_detector", "$hiview_root/utility/smart_parser:smart_parser", ] }