• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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("//build/test.gni")
15import("//foundation/appexecfwk/standard/appexecfwk.gni")
16import(
17    "//foundation/appexecfwk/standard/libs/libeventhandler/lib_event_handler_sources.gni")
18
19config("libeventhandler_test_private_config") {
20  defines = event_handler_log_domain_defines
21
22  configs = [ "${libs_path}/libeventhandler:libeventhandler_config" ]
23}
24
25module_output_path = "appexecfwk_standard/libeventhandler"
26
27ohos_unittest("LibEventHandlerEventQueueTest") {
28  module_out_path = module_output_path
29
30  sources = lib_event_handler_sources
31
32  sources += [ "unittest/lib_event_handler_event_queue_test.cpp" ]
33
34  configs = [ ":libeventhandler_test_private_config" ]
35
36  deps = [ "//third_party/googletest:gtest_main" ]
37
38  external_deps = [ "hiviewdfx_hilog_native:libhilog" ]
39}
40
41ohos_unittest("LibEventHandlerEventTest") {
42  module_out_path = module_output_path
43
44  sources = lib_event_handler_sources
45
46  sources += [ "unittest/lib_event_handler_event_test.cpp" ]
47
48  configs = [ ":libeventhandler_test_private_config" ]
49
50  deps = [ "//third_party/googletest:gtest_main" ]
51
52  external_deps = [ "hiviewdfx_hilog_native:libhilog" ]
53}
54
55ohos_unittest("LibEventHandlerEventRunnerTest") {
56  module_out_path = module_output_path
57
58  sources = lib_event_handler_sources
59
60  sources += [ "unittest/lib_event_handler_event_runner_test.cpp" ]
61
62  configs = [ ":libeventhandler_test_private_config" ]
63
64  deps = [ "//third_party/googletest:gtest_main" ]
65
66  external_deps = [ "hiviewdfx_hilog_native:libhilog" ]
67}
68
69group("unittest") {
70  testonly = true
71
72  deps = [
73    ":LibEventHandlerEventQueueTest",
74    ":LibEventHandlerEventRunnerTest",
75    ":LibEventHandlerEventTest",
76  ]
77}
78