• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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/ohos.gni")
15
16config("event_validator_config") {
17  include_dirs = [
18    "control/config/include",
19    "control/db/include",
20    "control/include",
21    "include",
22  ]
23  cflags_cc = [ "-D__HIVIEW_OHOS__" ]
24}
25
26ohos_source_set("event_validator") {
27  branch_protector_ret = "pac_ret"
28  sanitize = {
29    cfi = true
30    cfi_cross_dso = true
31    cfi_vcall_icall_only = true
32    debug = false
33  }
34
35  configs = [ ":event_validator_config" ]
36
37  sources = [
38    "control/config/daily_config.cpp",
39    "control/daily_controller.cpp",
40    "control/db/daily_db_helper.cpp",
41    "event_delayed_util.cpp",
42    "event_param_watcher.cpp",
43    "event_period_info_util.cpp",
44    "event_validator.cpp",
45    "event_verify_util.cpp",
46  ]
47
48  deps = [
49    "$hiview_base:hiviewbase",
50    "$hiview_core:hiview_core",
51  ]
52
53  external_deps = [
54    "bounds_checking_function:libsec_shared",
55    "cJSON:cjson",
56    "c_utils:utils",
57    "ffrt:libffrt",
58    "hilog:libhilog",
59    "hisysevent:libhisysevent",
60    "init:libbegetutil",
61    "jsoncpp:jsoncpp",
62    "relational_store:native_rdb",
63    "zlib:shared_libz",
64  ]
65
66  part_name = "hiview"
67  subsystem_name = "hiviewdfx"
68}
69
70group("unittest") {
71  testonly = true
72  deps = [
73    "test/unittest/common:DailyControllerTest",
74    "test/unittest/common:EventValidatorTest",
75  ]
76}
77
78group("moduletest") {
79  testonly = true
80  deps = []
81}
82
83group("fuzztest") {
84  testonly = true
85  deps = []
86}
87