• 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
25    #"${device_status_root_path}/libs/interface",
26    #"${device_status_root_path}/interfaces/innerkits/interaction/include",
27    #"${device_status_service_path}/delegate_task/include",
28    #"${device_status_service_path}/communication/service/include",
29    #"${device_status_service_path}/interaction/drag/src/include",
30    #"${device_status_service_path}/device_manager/include",
31    "${device_status_utils_path}/include",
32  ]
33}
34
35ohos_unittest("EpollManagerTest") {
36  sanitize = {
37    cfi = true
38    cfi_cross_dso = true
39    debug = false
40    blocklist = "./../../ipc_blocklist.txt"
41  }
42
43  module_out_path = module_output_path
44  include_dirs = [ "${device_status_interfaces_path}/innerkits/include" ]
45
46  sources = [ "src/epoll_manager_test.cpp" ]
47
48  configs = [
49    "${device_status_service_path}/interaction/drag:interaction_drag_public_config",
50    ":module_private_config",
51  ]
52
53  deps = [
54    "${device_status_root_path}/intention/common/epoll:intention_epoll",
55    "${device_status_root_path}/utils/common:devicestatus_util",
56    "${device_status_utils_path}:devicestatus_util",
57  ]
58
59  external_deps = [
60    "c_utils:utils",
61    "data_share:datashare_consumer",
62    "googletest:gtest_main",
63    "hilog:libhilog",
64  ]
65}
66
67ohos_unittest("ChannelTest") {
68  module_out_path = "${device_status_part_name}/device_status/devicestatussrv"
69
70  sources = [ "src/channel_test.cpp" ]
71
72  cflags = [ "-Dprivate=public" ]
73
74  deps = [
75    "${device_status_root_path}/intention/common/channel:intention_channel",
76    "${device_status_utils_path}:devicestatus_util",
77  ]
78
79  external_deps = [
80    "c_utils:utils",
81    "hilog:libhilog",
82  ]
83}
84
85group("unittest") {
86  testonly = true
87  deps = [
88    ":ChannelTest",
89    ":EpollManagerTest",
90  ]
91}
92