1# Copyright (c) 2022-2023 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 "//third_party/benchmark", 31 "//third_party/googletest:gmock_main", 32 "//third_party/googletest:gtest_main", 33 ] 34 35 external_deps = [ 36 "ability_base:want", 37 "bundle_framework:appexecfwk_base", 38 "c_utils:utils", 39 "common_event_service:cesfwk_innerkits", 40 "drivers_interface_usb:libusb_proxy_1.0", 41 "eventhandler:libeventhandler", 42 "hdf_core:libhdf_host", 43 "hdf_core:libhdf_utils", 44 "hilog:libhilog", 45 "ipc:ipc_single", 46 "safwk:system_ability_fwk", 47 "samgr:samgr_proxy", 48 ] 49 subsystem_name = "xts" 50 part_name = "hats" 51} 52 53ohos_moduletest_suite("HatsHdfUsbBenchmarkFunctionTest") { 54 module_out_path = module_output_path 55 sources = [ 56 "../UsbSubscriberTest/UsbSubscriberTest.cpp", 57 "./common/HdfUsbdBenchmarkFunctionTest.cpp", 58 ] 59 60 configs = [ ":hdf_usb" ] 61 62 deps = [ 63 "//third_party/benchmark", 64 "//third_party/googletest:gmock_main", 65 "//third_party/googletest:gtest_main", 66 ] 67 68 external_deps = [ 69 "ability_base:want", 70 "bundle_framework:appexecfwk_base", 71 "c_utils:utils", 72 "common_event_service:cesfwk_innerkits", 73 "drivers_interface_usb:libusb_proxy_1.0", 74 "eventhandler:libeventhandler", 75 "hdf_core:libhdf_host", 76 "hdf_core:libhdf_utils", 77 "hilog:libhilog", 78 "ipc:ipc_single", 79 "safwk:system_ability_fwk", 80 "samgr:samgr_proxy", 81 ] 82 subsystem_name = "xts" 83 part_name = "hats" 84} 85 86ohos_moduletest_suite("HatsHdfUsbBenchmarkRequestTest") { 87 module_out_path = module_output_path 88 sources = [ 89 "../UsbSubscriberTest/UsbSubscriberTest.cpp", 90 "./common/HdfUsbdBenchmarkRequestTest.cpp", 91 ] 92 93 configs = [ ":hdf_usb" ] 94 95 deps = [ 96 "//third_party/benchmark", 97 "//third_party/googletest:gmock_main", 98 "//third_party/googletest:gtest_main", 99 ] 100 101 external_deps = [ 102 "ability_base:want", 103 "bundle_framework:appexecfwk_base", 104 "c_utils:utils", 105 "common_event_service:cesfwk_innerkits", 106 "drivers_interface_usb:libusb_proxy_1.0", 107 "eventhandler:libeventhandler", 108 "hdf_core:libhdf_host", 109 "hdf_core:libhdf_utils", 110 "hilog:libhilog", 111 "ipc:ipc_single", 112 "safwk:system_ability_fwk", 113 "samgr:samgr_proxy", 114 ] 115 subsystem_name = "xts" 116 part_name = "hats" 117} 118 119ohos_moduletest_suite("HatsHdfUsbBenchmarkTransferTest") { 120 module_out_path = module_output_path 121 sources = [ 122 "../UsbSubscriberTest/UsbSubscriberTest.cpp", 123 "./common/HdfUsbdBenchmarkTransferTest.cpp", 124 ] 125 configs = [ ":hdf_usb" ] 126 127 deps = [ 128 "//third_party/benchmark", 129 "//third_party/googletest:gmock_main", 130 "//third_party/googletest:gtest_main", 131 ] 132 133 external_deps = [ 134 "ability_base:want", 135 "bundle_framework:appexecfwk_base", 136 "c_utils:utils", 137 "common_event_service:cesfwk_innerkits", 138 "drivers_interface_usb:libusb_proxy_1.0", 139 "eventhandler:libeventhandler", 140 "hdf_core:libhdf_host", 141 "hdf_core:libhdf_utils", 142 "hilog:libhilog", 143 "ipc:ipc_single", 144 "safwk:system_ability_fwk", 145 "samgr:samgr_proxy", 146 ] 147 subsystem_name = "xts" 148 part_name = "hats" 149} 150 151config("hdf_usb") { 152 include_dirs = [ 153 "include", 154 "../UsbSubscriberTest", 155 ] 156} 157