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}/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    "googletest:gtest_main",
62    "hilog:libhilog",
63  ]
64}
65
66ohos_unittest("ChannelTest") {
67  module_out_path = "${device_status_part_name}/devicestatussrv"
68
69  sources = [ "src/channel_test.cpp" ]
70
71  cflags = [ "-Dprivate=public" ]
72
73  deps = [
74    "${device_status_root_path}/intention/common/channel:intention_channel",
75    "${device_status_utils_path}:devicestatus_util",
76  ]
77
78  external_deps = [
79    "c_utils:utils",
80    "hilog:libhilog",
81  ]
82}
83
84group("unittest") {
85  testonly = true
86  deps = [
87    ":ChannelTest",
88    ":EpollManagerTest",
89  ]
90}
91