1# Copyright (c) 2022-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/ohos_var.gni")
15import("//drivers/peripheral/usb/usb.gni")
16import("//test/xts/tools/build/suite.gni")
17
18module_output_path = "hdf/usb"
19
20ohos_moduletest_suite("HatsHdfUsbBenchmarkDeviceTest") {
21  module_out_path = module_output_path
22  sources = [
23    "../UsbSubscriberTest/UsbSubscriberTest.cpp",
24    "./common/HdfUsbdBenchmarkDeviceTest.cpp",
25  ]
26
27  configs = [ ":hdf_usb" ]
28
29  deps = [
30    "${usb_driver_path}/hdi_service:libusb_interface_service_1.1",
31    "//third_party/benchmark",
32    "//third_party/googletest:gmock_main",
33    "//third_party/googletest:gtest_main",
34  ]
35
36  external_deps = [
37    "ability_base:want",
38    "bundle_framework:appexecfwk_base",
39    "c_utils:utils",
40    "common_event_service:cesfwk_innerkits",
41    "drivers_interface_usb:libusb_proxy_1.1",
42    "eventhandler:libeventhandler",
43    "hdf_core:libhdf_host",
44    "hdf_core:libhdf_utils",
45    "hilog:libhilog",
46    "ipc:ipc_single",
47    "safwk:system_ability_fwk",
48    "samgr:samgr_proxy",
49  ]
50  subsystem_name = "xts"
51  part_name = "hats"
52}
53
54ohos_moduletest_suite("HatsHdfUsbBenchmarkFunctionTest") {
55  module_out_path = module_output_path
56  sources = [
57    "../UsbSubscriberTest/UsbSubscriberTest.cpp",
58    "./common/HdfUsbdBenchmarkFunctionTest.cpp",
59  ]
60
61  configs = [ ":hdf_usb" ]
62
63  deps = [
64    "//third_party/benchmark",
65    "//third_party/googletest:gmock_main",
66    "//third_party/googletest:gtest_main",
67  ]
68
69  external_deps = [
70    "ability_base:want",
71    "bundle_framework:appexecfwk_base",
72    "c_utils:utils",
73    "common_event_service:cesfwk_innerkits",
74    "drivers_interface_usb:libusb_proxy_1.1",
75    "eventhandler:libeventhandler",
76    "hdf_core:libhdf_host",
77    "hdf_core:libhdf_utils",
78    "hilog:libhilog",
79    "ipc:ipc_single",
80    "safwk:system_ability_fwk",
81    "samgr:samgr_proxy",
82  ]
83  subsystem_name = "xts"
84  part_name = "hats"
85}
86
87ohos_moduletest_suite("HatsHdfUsbBenchmarkManagerInterfaceTest") {
88  module_out_path = module_output_path
89  sources = [
90    "../UsbSubscriberTest/UsbSubscriberTest.cpp",
91    "./common/HdfUsbdBenchmarkManagerInterfaceTest.cpp",
92  ]
93
94  configs = [ ":hdf_usb" ]
95
96  deps = [
97    "//third_party/benchmark",
98    "//third_party/googletest:gmock_main",
99    "//third_party/googletest:gtest_main",
100  ]
101
102  external_deps = [
103    "ability_base:want",
104    "bundle_framework:appexecfwk_base",
105    "c_utils:utils",
106    "common_event_service:cesfwk_innerkits",
107    "drivers_interface_usb:libusb_proxy_1.1",
108    "eventhandler:libeventhandler",
109    "hdf_core:libhdf_host",
110    "hdf_core:libhdf_utils",
111    "hilog:libhilog",
112    "ipc:ipc_single",
113    "safwk:system_ability_fwk",
114    "samgr:samgr_proxy",
115  ]
116  subsystem_name = "xts"
117  part_name = "hats"
118}
119
120ohos_moduletest_suite("HatsHdfUsbBenchmarkRequestTest") {
121  module_out_path = module_output_path
122  sources = [
123    "../UsbSubscriberTest/UsbSubscriberTest.cpp",
124    "./common/HdfUsbdBenchmarkRequestTest.cpp",
125  ]
126
127  configs = [ ":hdf_usb" ]
128
129  deps = [
130    "${usb_driver_path}/hdi_service:libusb_interface_service_1.1",
131    "//third_party/benchmark",
132    "//third_party/googletest:gmock_main",
133    "//third_party/googletest:gtest_main",
134  ]
135
136  external_deps = [
137    "ability_base:want",
138    "bundle_framework:appexecfwk_base",
139    "c_utils:utils",
140    "common_event_service:cesfwk_innerkits",
141    "drivers_interface_usb:libusb_proxy_1.1",
142    "eventhandler:libeventhandler",
143    "hdf_core:libhdf_host",
144    "hdf_core:libhdf_utils",
145    "hilog:libhilog",
146    "ipc:ipc_single",
147    "safwk:system_ability_fwk",
148    "samgr:samgr_proxy",
149  ]
150  subsystem_name = "xts"
151  part_name = "hats"
152}
153
154ohos_moduletest_suite("HatsHdfUsbBenchmarkTransferTest") {
155  module_out_path = module_output_path
156  sources = [
157    "../UsbSubscriberTest/UsbSubscriberTest.cpp",
158    "./common/HdfUsbdBenchmarkTransferTest.cpp",
159  ]
160  configs = [ ":hdf_usb" ]
161
162  deps = [
163    "//third_party/benchmark",
164    "//third_party/googletest:gmock_main",
165    "//third_party/googletest:gtest_main",
166  ]
167
168  external_deps = [
169    "ability_base:want",
170    "bundle_framework:appexecfwk_base",
171    "c_utils:utils",
172    "common_event_service:cesfwk_innerkits",
173    "drivers_interface_usb:libusb_proxy_1.1",
174    "eventhandler:libeventhandler",
175    "hdf_core:libhdf_host",
176    "hdf_core:libhdf_utils",
177    "hilog:libhilog",
178    "ipc:ipc_single",
179    "safwk:system_ability_fwk",
180    "samgr:samgr_proxy",
181  ]
182  subsystem_name = "xts"
183  part_name = "hats"
184}
185
186config("hdf_usb") {
187  include_dirs = [
188    "include",
189    "../UsbSubscriberTest",
190  ]
191}
192