• 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.
13
14import("//base/hiviewdfx/hiview/hiview.gni")
15import("//build/test.gni")
16
17module_output_path = "hiview/base/event_export"
18
19group("unittest") {
20  testonly = true
21  deps = [
22    ":EventExportConfigTest",
23    ":EventExportDbMgrTest",
24    ":EventExportMgrTest",
25  ]
26}
27
28config("event_export_config_test_config") {
29  visibility = [ ":*" ]
30
31  include_dirs = [ "unittest/common" ]
32
33  cflags = []
34}
35
36ohos_unittest("EventExportConfigTest") {
37  module_out_path = module_output_path
38
39  configs = [ ":event_export_config_test_config" ]
40
41  sources = [ "unittest/common/event_export_config_test.cpp" ]
42
43  deps = [
44    "$hiview_base:hiviewbase_static_lib_for_tdd",
45    "../../event_export:event_export_engine",
46  ]
47
48  external_deps = [
49    "cJSON:cjson",
50    "ffrt:libffrt",
51    "googletest:gmock",
52    "googletest:gtest_main",
53    "hilog:libhilog",
54    "jsoncpp:jsoncpp",
55  ]
56
57  resource_config_file = "resource/ohos_test.xml"
58}
59
60config("event_db_mgr_test_config") {
61  visibility = [ ":*" ]
62
63  include_dirs = [ "unittest/common" ]
64
65  cflags = []
66}
67
68ohos_unittest("EventExportDbMgrTest") {
69  module_out_path = module_output_path
70
71  configs = [ ":event_db_mgr_test_config" ]
72
73  sources = [ "unittest/common/event_export_db_mgr_test.cpp" ]
74
75  deps = [
76    "$hiview_base:hiviewbase_static_lib_for_tdd",
77    "../../event_export:event_export_engine",
78  ]
79
80  external_deps = [
81    "ffrt:libffrt",
82    "googletest:gmock",
83    "googletest:gtest_main",
84    "hilog:libhilog",
85    "relational_store:native_rdb",
86  ]
87}
88
89config("event_export_mgr_test_config") {
90  visibility = [ ":*" ]
91
92  include_dirs = [ "unittest/common" ]
93
94  cflags = []
95}
96
97ohos_unittest("EventExportMgrTest") {
98  module_out_path = module_output_path
99
100  configs = [ ":event_export_mgr_test_config" ]
101
102  sources = [ "unittest/common/event_export_mgr_test.cpp" ]
103
104  deps = [
105    "$hiview_base:hiviewbase",
106    "../../event_export:event_export_engine",
107  ]
108
109  external_deps = [
110    "ability_base:zuri",
111    "cJSON:cjson",
112    "data_share:datashare_consumer",
113    "ffrt:libffrt",
114    "googletest:gmock",
115    "googletest:gtest_main",
116    "hilog:libhilog",
117    "init:libbeget_proxy",
118    "init:libbegetutil",
119    "ipc:ipc_core",
120    "relational_store:native_rdb",
121  ]
122}
123