• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021-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("//base/notification/ces_standard/event.gni")
15import("//build/test.gni")
16
17module_output_path = "ces_standard/frameworks/native"
18
19config("kits_natvie_config") {
20  visibility = [ ":*" ]
21
22  include_dirs = [
23    "//foundation/aafwk/standard/interfaces/innerkits/ability_manager/include",
24    "//foundation/aafwk/standard/interfaces/innerkits/base/include/",
25    "//foundation/aafwk/standard/interfaces/innerkits/want/include/ohos/aafwk/content",
26    "//foundation/aafwk/standard/services/abilitymgr/include/",
27    "//foundation/appexecfwk/standard/services/bundlemgr/include",
28    "//foundation/distributedschedule/samgr/interfaces/innerkits/samgr_proxy/include",
29    "//foundation/distributedschedule/safwk/services/safwk/include",
30    "//utils/native/base/include",
31    "//utils/system/safwk/native/include",
32  ]
33
34  cflags = []
35
36  if (target_cpu == "arm") {
37    cflags += [ "-DBINDER_IPC_32BIT" ]
38  }
39}
40
41ohos_unittest("matching_skills_test") {
42  module_out_path = module_output_path
43
44  sources = [ "matching_skills_test.cpp" ]
45
46  configs = [ ":kits_natvie_config" ]
47
48  deps = [
49    "${ces_common_path}:libevent_common",
50    "${ces_core_path}:cesfwk_core",
51    "${ces_native_path}:cesfwk_innerkits",
52    "//third_party/googletest:gtest_main",
53    "//utils/native/base:utils",
54  ]
55
56  external_deps = [
57    "ability_base:want",
58    "bundle_framework:appexecfwk_base",
59    "ipc:ipc_core",
60  ]
61}
62
63ohos_unittest("common_event_subscribe_test") {
64  module_out_path = module_output_path
65
66  sources = [ "common_event_subscribe_test.cpp" ]
67
68  configs = [ ":kits_natvie_config" ]
69
70  deps = [
71    "${ces_common_path}:libevent_common",
72    "${ces_core_path}:cesfwk_core",
73    "${ces_native_path}:cesfwk_innerkits",
74    "${services_path}:cesfwk_services",
75    "//foundation/aafwk/standard/services/abilitymgr:abilityms",
76    "//foundation/appexecfwk/standard/interfaces/innerkits/libeventhandler:libeventhandler",
77    "//third_party/googletest:gtest_main",
78    "//utils/native/base:utils",
79  ]
80
81  external_deps = [
82    "ability_base:want",
83    "bundle_framework:appexecfwk_base",
84    "bundle_framework:appexecfwk_core",
85    "eventhandler:libeventhandler",
86    "ipc:ipc_core",
87  ]
88}
89
90ohos_unittest("common_event_unsubscribe_test") {
91  module_out_path = module_output_path
92
93  sources = [ "common_event_unsubscribe_test.cpp" ]
94
95  configs = [ ":kits_natvie_config" ]
96
97  deps = [
98    "${ces_core_path}:cesfwk_core",
99    "${ces_native_path}:cesfwk_innerkits",
100    "${services_path}:cesfwk_services",
101    "//foundation/aafwk/standard/services/abilitymgr:abilityms",
102    "//third_party/googletest:gtest_main",
103    "//utils/native/base:utils",
104  ]
105
106  external_deps = [
107    "ability_base:want",
108    "access_token:libaccesstoken_sdk",
109    "bundle_framework:appexecfwk_base",
110    "bundle_framework:appexecfwk_core",
111    "eventhandler:libeventhandler",
112    "ipc:ipc_core",
113  ]
114}
115
116group("unittest") {
117  testonly = true
118  deps = []
119
120  deps += [
121    # ":common_event_subscribe_test",
122    # ":common_event_unsubscribe_test",
123    ":matching_skills_test",
124  ]
125}
126