1# Copyright (c) 2021 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/hiview/hiview.gni")
15import("//build/ohos.gni")
16
17config("freeze_detector_config") {
18  visibility = [ ":*" ]
19  include_dirs = [
20    "//base/hiviewdfx/hiview/base/include",
21    "//base/hiviewdfx/hiview/utility/smart_parser",
22    "//base/hiviewdfx/hiview/base/event_store/include",
23    "//base/hiviewdfx/hiview/plugins/faultlogger/interfaces/cpp/innerkits/include",
24    ".",
25  ]
26}
27
28ohos_source_set("freeze_detector") {
29  part_name = "hiview"
30  include_dirs =
31      [ "$hiview_framework/native/unified_collection/process/include" ]
32
33  sources = [
34    "db_helper.cpp",
35    "freeze_common.cpp",
36    "freeze_detector_plugin.cpp",
37    "resolver.cpp",
38    "rule_cluster.cpp",
39    "vendor.cpp",
40    "watch_point.cpp",
41  ]
42
43  configs = [ ":freeze_detector_config" ]
44
45  external_deps = [
46    "c_utils:utils",
47    "ffrt:libffrt",
48    "hilog:libhilog",
49    "libxml2:libxml2",
50    "power_manager:powermgr_client",
51  ]
52
53  deps = [
54    "$hiview_base:hiviewbase",
55    "$hiview_interfaces/inner_api/unified_collection/utility:libucollection_utility",
56    "$hiview_plugin/faultlogger:libfaultlogger",
57    "config:config",
58  ]
59}
60
61group("unittest") {
62  testonly = true
63  deps = [
64    "test:FreezeDetectorTest",
65    "test:FreezeDetectorUnittest",
66  ]
67}
68
69group("moduletest") {
70  testonly = true
71  deps = []
72}
73