• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2023-2025 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("//test/xts/tools/build/suite.gni")
16
17module_output_path = "hdf/usb"
18
19ohos_moduletest_suite("HatsHdfUsbTransferAdditionalTest") {
20  module_out_path = module_output_path
21  sources = [
22    "../UsbSubscriberTest/UsbSubscriberTest.cpp",
23    "./common/usbd_transfer_test.cpp",
24  ]
25  configs = [ ":hdf_usb_additional" ]
26
27  deps = [ "//third_party/googletest:gtest_main" ]
28
29  external_deps = [
30    "ability_base:want",
31    "bundle_framework:appexecfwk_base",
32    "c_utils:utils",
33    "common_event_service:cesfwk_innerkits",
34    "drivers_interface_usb:libusb_proxy_1.2",
35    "eventhandler:libeventhandler",
36    "hdf_core:libhdf_host",
37    "hdf_core:libhdf_utils",
38    "hilog:libhilog",
39    "ipc:ipc_single",
40    "safwk:system_ability_fwk",
41    "samgr:samgr_proxy",
42  ]
43
44  subsystem_name = "hdf"
45  part_name = "drivers_peripheral_usb"
46}
47
48ohos_moduletest_suite("HatsHdfUsbTransferAdditionalAddTest") {
49  module_out_path = module_output_path
50  sources = [
51    "../UsbSubscriberTest/UsbSubscriberTest.cpp",
52    "./common/usbd_transfer_test_additional.cpp",
53  ]
54  configs = [ ":hdf_usb_additional" ]
55
56  deps = [ "//third_party/googletest:gtest_main" ]
57
58  external_deps = [
59    "ability_base:want",
60    "bundle_framework:appexecfwk_base",
61    "c_utils:utils",
62    "common_event_service:cesfwk_innerkits",
63    "drivers_interface_usb:libusb_proxy_1.2",
64    "eventhandler:libeventhandler",
65    "hdf_core:libhdf_host",
66    "hdf_core:libhdf_utils",
67    "hilog:libhilog",
68    "ipc:ipc_single",
69    "safwk:system_ability_fwk",
70    "samgr:samgr_proxy",
71  ]
72
73  subsystem_name = "hdf"
74  part_name = "drivers_peripheral_usb"
75}
76
77ohos_moduletest_suite("HatsHdfUsbTransferAddInterruptTest") {
78  module_out_path = module_output_path
79  sources = [
80    "../UsbSubscriberTest/UsbSubscriberTest.cpp",
81    "./common/usbd_transfer_test_additional_interrupt.cpp",
82  ]
83  configs = [ ":hdf_usb_additional" ]
84
85  deps = [ "//third_party/googletest:gtest_main" ]
86
87  external_deps = [
88    "ability_base:want",
89    "bundle_framework:appexecfwk_base",
90    "c_utils:utils",
91    "common_event_service:cesfwk_innerkits",
92    "drivers_interface_usb:libusb_proxy_1.2",
93    "eventhandler:libeventhandler",
94    "hdf_core:libhdf_host",
95    "hdf_core:libhdf_utils",
96    "hilog:libhilog",
97    "ipc:ipc_single",
98    "safwk:system_ability_fwk",
99    "samgr:samgr_proxy",
100  ]
101
102  subsystem_name = "hdf"
103  part_name = "drivers_peripheral_usb"
104}
105
106config("hdf_usb_additional") {
107  include_dirs = [
108    "include",
109    "../UsbSubscriberTest",
110  ]
111}
112
113group("transferAdditional_test") {
114  testonly = true
115  deps = [
116    ":HatsHdfUsbTransferAddInterruptTest",
117    ":HatsHdfUsbTransferAdditionalAddTest",
118    ":HatsHdfUsbTransferAdditionalTest",
119  ]
120}
121