• 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/distributed_notification_service/notification.gni")
15import("//build/ohos.gni")
16import("//build/test.gni")
17
18module_output_path = "${component_name}/moduletest"
19
20ohos_moduletest("ans_module_test") {
21  module_out_path = module_output_path
22  include_dirs = [
23    "include",
24    "//commonlibrary/c_utils/base/include",
25    "//utils/system/safwk/native/include",
26    "${services_path}/ans/include",
27    "${services_path}/ans/test/unittest",
28    "${services_path}/ans/test/unittest/mock/include",
29    "${services_path}/test/moduletest/mock/include",
30  ]
31
32  sources = [
33    "${services_path}/ans/src/advanced_notification_service.cpp",
34    "${services_path}/ans/src/advanced_notification_service_ability.cpp",
35    "${services_path}/ans/src/event_report.cpp",
36    "${services_path}/ans/src/notification_preferences.cpp",
37    "${services_path}/ans/src/notification_preferences_database.cpp",
38    "${services_path}/ans/src/notification_preferences_info.cpp",
39    "${services_path}/ans/src/notification_rdb_data_mgr.cpp",
40    "${services_path}/ans/src/notification_slot_filter.cpp",
41    "${services_path}/ans/src/notification_subscriber_manager.cpp",
42    "${services_path}/ans/src/permission_filter.cpp",
43    "${services_path}/ans/src/reminder_data_manager.cpp",
44    "${services_path}/ans/src/reminder_event_manager.cpp",
45    "${services_path}/ans/src/reminder_timer_info.cpp",
46    "${services_path}/ans/src/system_event_observer.cpp",
47    "${services_path}/ans/test/unittest/mock/mock_access_token_helper.cpp",
48    "${services_path}/ans/test/unittest/mock/mock_ipc.cpp",
49    "ans_module_test.cpp",
50    "mock/blob.cpp",
51    "mock/distributed_kv_data_manager.cpp",
52    "mock/mock_bundle_manager.cpp",
53    "mock/mock_bundle_manager_helper.cpp",
54    "mock/mock_bundle_mgr_proxy.cpp",
55    "mock/mock_event_handler.cpp",
56    "mock/mock_single_kv_store.cpp",
57  ]
58
59  configs = [ "//commonlibrary/c_utils/base:utils_config" ]
60
61  deps = [
62    "${core_path}:ans_core",
63    "${frameworks_module_ans_path}:ans_innerkits",
64    "${services_path}/ans:libans",
65    "//foundation/arkui/ace_engine/interfaces/inner_api/ui_service_manager:ui_service_mgr",
66  ]
67
68  external_deps = [
69    "ability_base:want",
70    "ability_base:zuri",
71    "ability_runtime:abilitykit_native",
72    "ability_runtime:app_manager",
73    "ability_runtime:wantagent_innerkits",
74    "access_token:libaccesstoken_sdk",
75    "bundle_framework:appexecfwk_base",
76    "bundle_framework:appexecfwk_core",
77    "c_utils:utils",
78    "common_event_service:cesfwk_innerkits",
79    "eventhandler:libeventhandler",
80    "hisysevent_native:libhisysevent",
81    "hitrace_native:hitrace_meter",
82    "hitrace_native:libhitracechain",
83    "hiviewdfx_hilog_native:libhilog",
84    "ipc:ipc_core",
85    "kv_store:distributeddata_inner",
86    "multimedia_image_framework:image_native",
87    "multimedia_player_framework:media_client",
88    "os_account:os_account_innerkits",
89    "relational_store:native_rdb",
90    "safwk:system_ability_fwk",
91    "samgr:samgr_proxy",
92    "time_service:time_client",
93  ]
94
95  if (device_usage) {
96    external_deps += [ "device_usage_statistics:usagestatsinner" ]
97    defines = [ "DEVICE_USAGE_STATISTICS_ENABLE" ]
98  }
99
100  subsystem_name = "${subsystem_name}"
101  part_name = "${component_name}"
102}
103
104group("moduletest") {
105  testonly = true
106  deps = []
107
108  deps += [ ":ans_module_test" ]
109}
110