• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021-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/ohos.gni")
15
16config("sysevent_source_config") {
17  include_dirs = [
18    "$hiview_core/param_update/include",
19    "control/config/include",
20    "control/db/include",
21    "control/include",
22    "include",
23  ]
24  cflags_cc = [ "-D__HIVIEW_OHOS__" ]
25}
26
27ohos_prebuilt_etc("hiview.para.dac") {
28  source = "config/hiview.para.dac"
29  relative_install_dir = "param"
30  part_name = "hiview"
31  subsystem_name = "hiviewdfx"
32}
33
34ohos_prebuilt_etc("monitor_config") {
35  source = "config/monitor.cfg"
36  relative_install_dir = "hiview"
37  part_name = "hiview"
38  subsystem_name = "hiviewdfx"
39}
40
41ohos_source_set("sysevent_source") {
42  branch_protector_ret = "pac_ret"
43  sanitize = {
44    cfi = true
45    cfi_cross_dso = true
46    cfi_vcall_icall_only = true
47    debug = false
48  }
49
50  configs = [ ":sysevent_source_config" ]
51
52  sources = [
53    "control/config/daily_config.cpp",
54    "control/daily_controller.cpp",
55    "control/db/daily_db_helper.cpp",
56    "event_server.cpp",
57    "monitor_config.cpp",
58    "platform_monitor.cpp",
59    "sys_event_stat.cpp",
60    "sysevent_source.cpp",
61  ]
62
63  deps = [
64    ":hiview.para.dac",
65    ":monitor_config",
66    "$hiview_adapter/plugins/eventservice/service:sys_event_service_adapter",
67    "$hiview_base:hiviewbase",
68    "$hiview_core:hiview_core",
69  ]
70
71  external_deps = [
72    "bounds_checking_function:libsec_shared",
73    "cJSON:cjson",
74    "ffrt:libffrt",
75    "hilog:libhilog",
76    "hisysevent:libhisysevent",
77    "init:libbegetutil",
78    "jsoncpp:jsoncpp",
79    "relational_store:native_rdb",
80    "safwk:system_ability_fwk",
81    "zlib:shared_libz",
82  ]
83
84  part_name = "hiview"
85  subsystem_name = "hiviewdfx"
86}
87
88group("unittest") {
89  testonly = true
90  deps = [
91    "test/unittest/common:DailyControllerTest",
92    "test/unittest/common:EventServerTest",
93    "test/unittest/common:SysEventStatTest",
94  ]
95}
96
97group("moduletest") {
98  testonly = true
99  deps = []
100}
101
102group("fuzztest") {
103  testonly = true
104  deps = [
105    "test/fuzztest/common/eventserver_fuzzer:EventServerFuzzTest",
106    "test/fuzztest/common/eventserversocket_fuzzer:EventServerSocketFuzzTest",
107    "test/fuzztest/common/eventsource_fuzzer:EventSourceFuzzTest",
108  ]
109}
110