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/test.gni")
16
17module_output_path = "hiview/hiview"
18
19group("unittest") {
20  testonly = true
21  deps = [ ":SysEventServiceOhosUnitTest" ]
22}
23
24config("unittest_config") {
25  include_dirs = [
26    "//third_party/bounds_checking_function/include",
27    "unittest/common",
28    "$hiview_adapter/utility/include",
29    "$hiview_plugin/sysevent_source/include",
30    "$hiview_core/include",
31    "$hiview_base/include",
32  ]
33
34  cflags_cc = [ "-D__UNITTEST__" ]
35}
36
37ohos_unittest("SysEventServiceOhosUnitTest") {
38  module_out_path = module_output_path
39  configs = [ ":unittest_config" ]
40
41  sources = [
42    "unittest/common/data_share_test.cpp",
43    "unittest/common/event_query_wrapper_builder_test.cpp",
44    "unittest/common/sys_event_service_ohos_test.cpp",
45  ]
46
47  cflags_cc = [ "-DTEST_LOCAL_SRC" ]
48
49  deps = [
50    "$hiview_adapter/plugins/eventservice/service:sys_event_service_adapter",
51    "$hiview_base:hiview_base",
52    "$hiview_core:hiview_core",
53    "$hiview_plugin/sys_dispatcher:sys_dispatcher",
54  ]
55
56  external_deps = [
57    "googletest:gtest_main",
58    "hilog:libhilog",
59    "init:libbeget_proxy",
60    "init:libbegetutil",
61    "ipc:ipc_single",
62    "jsoncpp:jsoncpp",
63    "relational_store:native_rdb",
64    "safwk:system_ability_fwk",
65    "samgr:samgr_proxy",
66  ]
67}
68