• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2024 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("../../../../device_status.gni")
16
17module_output_path = "${device_status_part_name}/device_status/unit_out"
18
19config("module_private_config") {
20  visibility = [ ":*" ]
21
22  include_dirs = [
23    "include",
24    "${device_status_root_path}/libs/interface",
25    "${device_status_root_path}/interfaces/innerkits/interaction/include",
26    "${device_status_service_path}/delegate_task/include",
27    "${device_status_service_path}/communication/service/include",
28    "${device_status_service_path}/interaction/drag/src/include",
29    "${device_status_service_path}/device_manager/include",
30    "${device_status_utils_path}/include",
31  ]
32}
33
34ohos_unittest("TimerManagerTest") {
35  sanitize = {
36    cfi = true
37    cfi_cross_dso = true
38    debug = false
39    blocklist = "./../../ipc_blocklist.txt"
40  }
41
42  module_out_path = module_output_path
43  include_dirs = [ "${device_status_interfaces_path}/innerkits/include" ]
44
45  sources = [ "src/timer_manager_test.cpp" ]
46
47  cflags = [ "-Dprivate=public" ]
48
49  configs = [
50    "${device_status_service_path}/interaction/drag:interaction_drag_public_config",
51    ":module_private_config",
52  ]
53
54  deps = [
55    "${device_status_root_path}/intention/adapters/ddm_adapter:intention_ddm_adapter",
56    "${device_status_root_path}/intention/common/channel:intention_channel",
57    "${device_status_root_path}/intention/cooperate/plugin:intention_cooperate",
58    "${device_status_root_path}/intention/prototype:intention_prototype",
59    "${device_status_root_path}/intention/scheduler/timer_manager:intention_timer_manager",
60    "${device_status_root_path}/intention/services/device_manager:intention_device_manager",
61    "${device_status_root_path}/services:devicestatus_static_service",
62    "${device_status_root_path}/utils/common:devicestatus_util",
63    "${device_status_root_path}/utils/ipc:devicestatus_ipc",
64    "${device_status_service_path}/interaction/drag:interaction_drag",
65    "${device_status_utils_path}:devicestatus_util",
66  ]
67
68  external_deps = [
69    "ability_runtime:app_manager",
70    "access_token:libaccesstoken_sdk",
71    "bundle_framework:appexecfwk_core",
72    "common_event_service:cesfwk_innerkits",
73    "cJSON:cjson",
74    "c_utils:utils",
75    "data_share:datashare_consumer",
76    "device_manager:devicemanagersdk",
77    "eventhandler:libeventhandler",
78    "googletest:gtest_main",
79    "graphic_2d:libcomposer",
80    "graphic_2d:librender_service_base",
81    "graphic_2d:librender_service_client",
82    "graphic_2d:window_animation",
83    "hilog:libhilog",
84    "image_framework:image_native",
85    "input:libmmi-client",
86    "libxml2:libxml2",
87    "samgr:samgr_proxy",
88    "window_manager:libdm",
89    "window_manager:libwm",
90    "window_manager:libwmutil_base",
91  ]
92}
93
94group("unittest") {
95  testonly = true
96  deps = []
97  if (device_status_intention_framework) {
98    deps += [ ":TimerManagerTest" ]
99  }
100}
101