• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2022 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("//build/test.gni")
15
16module_output_path = "hisysevent_native/frameworks_native"
17
18group("unittest") {
19  testonly = true
20  deps = [ ":HiSysEventToolUnitTest" ]
21}
22
23config("unittest_config") {
24  include_dirs = [ "//base/hiviewdfx/hisysevent/frameworks/native/include" ]
25
26  cflags_cc = [ "-D__UNITTEST__" ]
27}
28
29ohos_unittest("HiSysEventToolUnitTest") {
30  module_out_path = module_output_path
31
32  configs = [ ":unittest_config" ]
33
34  sources = [
35    "//base/hiviewdfx/hisysevent/frameworks/native/hisysevent_json_decorator.cpp",
36    "//base/hiviewdfx/hisysevent/frameworks/native/hisysevent_tool.cpp",
37    "//base/hiviewdfx/hisysevent/frameworks/native/hisysevent_tool_listener.cpp",
38    "//base/hiviewdfx/hisysevent/frameworks/native/hisysevent_tool_query.cpp",
39    "//base/hiviewdfx/hisysevent/frameworks/native/json_flatten_parser.cpp",
40    "//base/hiviewdfx/hisysevent/frameworks/native/test/unittest/common/hisysevent_tool_unit_test.cpp",
41  ]
42
43  cflags_cc = [ "-DTEST_LOCAL_SRC" ]
44
45  deps = [ "//third_party/googletest:gtest_main" ]
46
47  external_deps = [
48    "c_utils:utils",
49    "hilog_native:libhilog",
50    "hisysevent_native:libhisysevent",
51    "hisysevent_native:libhisyseventmanager",
52    "ipc:ipc_core",
53    "samgr:samgr_proxy",
54  ]
55}
56