# Copyright (c) 2021 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import("//base/usb/usb_manager/usbmgr.gni") import("//build/test.gni") module_output_path = "${usb_manager_part_name}/usb_unittest_test" config("module_private_config") { visibility = [ ":*" ] include_dirs = [ "include" ] } ohos_unittest("test_usbdevicepipe") { module_out_path = module_output_path sources = [ "src/usb_device_pipe_test.cpp" ] configs = [ "${utils_path}:utils_config", ":module_private_config", ] deps = [ "${usb_manager_path}/interfaces/innerkits:usbsrv_client", "${usb_manager_path}/services:usbservice", "//third_party/googletest:gtest_main", ] external_deps = [ "ability_base:want", "bundle_framework:appexecfwk_base", "ces_standard:cesfwk_innerkits", "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", "safwk:system_ability_fwk", "samgr_standard:samgr_proxy", "usb_device_driver:usbd_client", "utils_base:utils", ] } ohos_unittest("test_bulkcallback") { module_out_path = module_output_path sources = [ "src/usb_bulkcallback_test.cpp", "src/usb_callback_test.cpp", ] configs = [ "${utils_path}:utils_config", ":module_private_config", ] deps = [ "${usb_manager_path}/interfaces/innerkits:usbsrv_client", "${usb_manager_path}/services:usbservice", "//third_party/googletest:gtest_main", ] external_deps = [ "ability_base:want", "bundle_framework:appexecfwk_base", "ces_standard:cesfwk_innerkits", "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", "safwk:system_ability_fwk", "samgr_standard:samgr_proxy", "usb_device_driver:usbd_client", "utils_base:utils", ] } ohos_unittest("test_usbrequest") { module_out_path = module_output_path sources = [ "src/usb_request_test.cpp" ] configs = [ "${utils_path}:utils_config", ":module_private_config", ] deps = [ "${usb_manager_path}/interfaces/innerkits:usbsrv_client", "${usb_manager_path}/services:usbservice", "//third_party/googletest:gtest_main", ] external_deps = [ "ability_base:want", "bundle_framework:appexecfwk_base", "ces_standard:cesfwk_innerkits", "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", "safwk:system_ability_fwk", "samgr_standard:samgr_proxy", "usb_device_driver:usbd_client", "utils_base:utils", ] } ohos_unittest("test_usbcore") { module_out_path = module_output_path sources = [ "src/usb_core_test.cpp" ] configs = [ "${utils_path}:utils_config", ":module_private_config", ] deps = [ "${usb_manager_path}/interfaces/innerkits:usbsrv_client", "${usb_manager_path}/services:usbservice", "//third_party/googletest:gtest_main", ] external_deps = [ "ability_base:want", "bundle_framework:appexecfwk_base", "ces_standard:cesfwk_innerkits", "eventhandler:libeventhandler", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", "safwk:system_ability_fwk", "samgr_standard:samgr_proxy", "usb_device_driver:usbd_client", "utils_base:utils", ] } group("unittest") { testonly = true deps = [] }