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