1f857971dSopenharmony_ci# Copyright (c) 2024 Huawei Device Co., Ltd.
2f857971dSopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License");
3f857971dSopenharmony_ci# you may not use this file except in compliance with the License.
4f857971dSopenharmony_ci# You may obtain a copy of the License at
5f857971dSopenharmony_ci#
6f857971dSopenharmony_ci#     http://www.apache.org/licenses/LICENSE-2.0
7f857971dSopenharmony_ci#
8f857971dSopenharmony_ci# Unless required by applicable law or agreed to in writing, software
9f857971dSopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS,
10f857971dSopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11f857971dSopenharmony_ci# See the License for the specific language governing permissions and
12f857971dSopenharmony_ci# limitations under the License.
13f857971dSopenharmony_ci
14f857971dSopenharmony_ciimport("//build/test.gni")
15f857971dSopenharmony_ciimport("../../../../device_status.gni")
16f857971dSopenharmony_ci
17f857971dSopenharmony_cimodule_output_path = "${device_status_part_name}/unit_out"
18f857971dSopenharmony_ci
19f857971dSopenharmony_ciohos_unittest("InputAdapterTest") {
20f857971dSopenharmony_ci  sanitize = {
21f857971dSopenharmony_ci    cfi = true
22f857971dSopenharmony_ci    cfi_cross_dso = true
23f857971dSopenharmony_ci    debug = false
24f857971dSopenharmony_ci    blocklist = "./../../ipc_blocklist.txt"
25f857971dSopenharmony_ci  }
26f857971dSopenharmony_ci
27f857971dSopenharmony_ci  branch_protector_ret = "pac_ret"
28f857971dSopenharmony_ci  module_out_path = module_output_path
29f857971dSopenharmony_ci  include_dirs = [
30f857971dSopenharmony_ci    "${device_status_utils_path}",
31f857971dSopenharmony_ci    "${device_status_utils_path}/include",
32f857971dSopenharmony_ci    "${device_status_root_path}/intention/prototype/include",
33f857971dSopenharmony_ci  ]
34f857971dSopenharmony_ci
35f857971dSopenharmony_ci  sources = [ "src/input_adapter_test.cpp" ]
36f857971dSopenharmony_ci
37f857971dSopenharmony_ci  deps = [ "${device_status_root_path}/intention/adapters/input_adapter:intention_input_adapter" ]
38f857971dSopenharmony_ci  external_deps = [
39f857971dSopenharmony_ci    "access_token:libaccesstoken_sdk",
40f857971dSopenharmony_ci    "access_token:libnativetoken_shared",
41f857971dSopenharmony_ci    "access_token:libtokensetproc_shared",
42f857971dSopenharmony_ci    "c_utils:utils",
43f857971dSopenharmony_ci    "hilog:libhilog",
44f857971dSopenharmony_ci    "input:libmmi-client",
45f857971dSopenharmony_ci  ]
46f857971dSopenharmony_ci}
47f857971dSopenharmony_ci
48f857971dSopenharmony_ciohos_unittest("DsoftbusAdapterTest") {
49f857971dSopenharmony_ci  sanitize = {
50f857971dSopenharmony_ci    cfi = true
51f857971dSopenharmony_ci    cfi_cross_dso = true
52f857971dSopenharmony_ci    debug = false
53f857971dSopenharmony_ci    blocklist = "./../../ipc_blocklist.txt"
54f857971dSopenharmony_ci  }
55f857971dSopenharmony_ci
56f857971dSopenharmony_ci  cflags = [ "-Dprivate=public" ]
57f857971dSopenharmony_ci
58f857971dSopenharmony_ci  branch_protector_ret = "pac_ret"
59f857971dSopenharmony_ci  module_out_path = module_output_path
60f857971dSopenharmony_ci  include_dirs = [
61f857971dSopenharmony_ci    "${device_status_utils_path}",
62f857971dSopenharmony_ci    "${device_status_utils_path}/include",
63f857971dSopenharmony_ci    "${device_status_root_path}/intention/prototype/include",
64f857971dSopenharmony_ci  ]
65f857971dSopenharmony_ci
66f857971dSopenharmony_ci  sources = [ "src/dsoftbus_adapter_test.cpp" ]
67f857971dSopenharmony_ci
68f857971dSopenharmony_ci  deps = [
69f857971dSopenharmony_ci    "${device_status_root_path}/intention/adapters/dsoftbus_adapter:intention_dsoftbus_adapter",
70f857971dSopenharmony_ci    "${device_status_root_path}/intention/prototype:intention_prototype",
71f857971dSopenharmony_ci    "${device_status_root_path}/utils/common:devicestatus_util",
72f857971dSopenharmony_ci    "${device_status_root_path}/utils/ipc:devicestatus_ipc",
73f857971dSopenharmony_ci  ]
74f857971dSopenharmony_ci  external_deps = [
75f857971dSopenharmony_ci    "access_token:libaccesstoken_sdk",
76f857971dSopenharmony_ci    "access_token:libnativetoken_shared",
77f857971dSopenharmony_ci    "access_token:libtokensetproc_shared",
78f857971dSopenharmony_ci    "c_utils:utils",
79f857971dSopenharmony_ci    "device_manager:devicemanagersdk",
80f857971dSopenharmony_ci    "dsoftbus:softbus_client",
81f857971dSopenharmony_ci    "hilog:libhilog",
82f857971dSopenharmony_ci    "input:libmmi-client",
83f857971dSopenharmony_ci  ]
84f857971dSopenharmony_ci}
85f857971dSopenharmony_ci
86f857971dSopenharmony_ciohos_unittest("DDMAdapterTest") {
87f857971dSopenharmony_ci  sanitize = {
88f857971dSopenharmony_ci    cfi = true
89f857971dSopenharmony_ci    cfi_cross_dso = true
90f857971dSopenharmony_ci    debug = false
91f857971dSopenharmony_ci    blocklist = "./../../ipc_blocklist.txt"
92f857971dSopenharmony_ci  }
93f857971dSopenharmony_ci
94f857971dSopenharmony_ci  cflags = [ "-Dprivate=public" ]
95f857971dSopenharmony_ci
96f857971dSopenharmony_ci  branch_protector_ret = "pac_ret"
97f857971dSopenharmony_ci  module_out_path = module_output_path
98f857971dSopenharmony_ci  include_dirs = [
99f857971dSopenharmony_ci    "${device_status_utils_path}",
100f857971dSopenharmony_ci    "${device_status_utils_path}/include",
101f857971dSopenharmony_ci    "${device_status_root_path}/intention/prototype/include",
102f857971dSopenharmony_ci  ]
103f857971dSopenharmony_ci
104f857971dSopenharmony_ci  sources = [ "src/ddm_adapter_test.cpp" ]
105f857971dSopenharmony_ci
106f857971dSopenharmony_ci  deps = [ "${device_status_root_path}/intention/adapters/ddm_adapter:intention_ddm_adapter" ]
107f857971dSopenharmony_ci  external_deps = [
108f857971dSopenharmony_ci    "access_token:libaccesstoken_sdk",
109f857971dSopenharmony_ci    "access_token:libnativetoken_shared",
110f857971dSopenharmony_ci    "access_token:libtokensetproc_shared",
111f857971dSopenharmony_ci    "c_utils:utils",
112f857971dSopenharmony_ci    "device_manager:devicemanagersdk",
113f857971dSopenharmony_ci    "dsoftbus:softbus_client",
114f857971dSopenharmony_ci    "hilog:libhilog",
115f857971dSopenharmony_ci    "input:libmmi-client",
116f857971dSopenharmony_ci    "ipc:ipc_single",
117f857971dSopenharmony_ci  ]
118f857971dSopenharmony_ci}
119f857971dSopenharmony_ci
120f857971dSopenharmony_ciohos_unittest("CommonEventAdapterTest") {
121f857971dSopenharmony_ci  sanitize = {
122f857971dSopenharmony_ci    cfi = true
123f857971dSopenharmony_ci    cfi_cross_dso = true
124f857971dSopenharmony_ci    debug = false
125f857971dSopenharmony_ci    blocklist = "./../../ipc_blocklist.txt"
126f857971dSopenharmony_ci  }
127f857971dSopenharmony_ci
128f857971dSopenharmony_ci  cflags = [ "-Dprivate=public" ]
129f857971dSopenharmony_ci
130f857971dSopenharmony_ci  branch_protector_ret = "pac_ret"
131f857971dSopenharmony_ci  module_out_path = module_output_path
132f857971dSopenharmony_ci  include_dirs = [
133f857971dSopenharmony_ci    "${device_status_utils_path}",
134f857971dSopenharmony_ci    "${device_status_utils_path}/include",
135f857971dSopenharmony_ci    "${device_status_root_path}/intention/prototype/include",
136f857971dSopenharmony_ci  ]
137f857971dSopenharmony_ci
138f857971dSopenharmony_ci  sources = [ "src/common_event_adapter_test.cpp" ]
139f857971dSopenharmony_ci
140f857971dSopenharmony_ci  deps = [ "${device_status_root_path}/intention/adapters/common_event_adapter:intention_common_event_adapter" ]
141f857971dSopenharmony_ci  external_deps = [
142f857971dSopenharmony_ci    "ability_base:want",
143f857971dSopenharmony_ci    "c_utils:utils",
144f857971dSopenharmony_ci    "hilog:libhilog",
145f857971dSopenharmony_ci    "input:libmmi-client",
146f857971dSopenharmony_ci  ]
147f857971dSopenharmony_ci}
148f857971dSopenharmony_ci
149f857971dSopenharmony_cigroup("unittest") {
150f857971dSopenharmony_ci  testonly = true
151f857971dSopenharmony_ci  deps = [
152f857971dSopenharmony_ci    ":CommonEventAdapterTest",
153f857971dSopenharmony_ci    ":DDMAdapterTest",
154f857971dSopenharmony_ci    ":DsoftbusAdapterTest",
155f857971dSopenharmony_ci    ":InputAdapterTest",
156f857971dSopenharmony_ci  ]
157f857971dSopenharmony_ci}
158