summaryrefslogtreecommitdiffstats
path: root/tests/tests.c
diff options
context:
space:
mode:
authorAnastasia Klimchuk <aklm@chromium.org>2021-09-17 16:00:16 +1000
committerNico Huber <nico.h@gmx.de>2021-10-18 12:22:47 +0000
commita7a59cf0bb37b7416756e6b1977b8667bbecb01b (patch)
treee2d2b410c7d670ca486f750fa44f0f6c9e6fa41f /tests/tests.c
parent97acc374e453233fed65b397c4195c21dd5a0a57 (diff)
downloadflashrom-a7a59cf0bb37b7416756e6b1977b8667bbecb01b.tar.gz
flashrom-a7a59cf0bb37b7416756e6b1977b8667bbecb01b.tar.bz2
flashrom-a7a59cf0bb37b7416756e6b1977b8667bbecb01b.zip
tests: Extract libusb wraps into separate file
In preparation for adding more tests with lots of libusb wraps, existing wraps are extracted into separate file. BUG=b:181803212 TEST=builds and ninja test Change-Id: I17c1cc0189fcb742a99ad1b0fd615ab95504a74a Signed-off-by: Anastasia Klimchuk <aklm@chromium.org> Reviewed-on: https://review.coreboot.org/c/flashrom/+/57916 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
Diffstat (limited to 'tests/tests.c')
-rw-r--r--tests/tests.c46
1 files changed, 0 insertions, 46 deletions
diff --git a/tests/tests.c b/tests/tests.c
index afba5f367..3eb3129ac 100644
--- a/tests/tests.c
+++ b/tests/tests.c
@@ -282,52 +282,6 @@ unsigned int __wrap_test_inl(unsigned short port)
return 0;
}
-void *__wrap_usb_dev_get_by_vid_pid_number(
- libusb_context *usb_ctx, uint16_t vid, uint16_t pid, unsigned int num)
-{
- LOG_ME;
- return not_null();
-}
-
-int __wrap_libusb_set_configuration(libusb_device_handle *devh, int config)
-{
- LOG_ME;
- return 0;
-}
-
-int __wrap_libusb_claim_interface(libusb_device_handle *devh, int interface_number)
-{
- LOG_ME;
- return 0;
-}
-
-int __wrap_libusb_control_transfer(libusb_device_handle *devh, uint8_t bmRequestType,
- uint8_t bRequest, uint16_t wValue, uint16_t wIndex, unsigned char *data,
- uint16_t wLength, unsigned int timeout)
-{
- LOG_ME;
- if (get_io() && get_io()->libusb_control_transfer)
- return get_io()->libusb_control_transfer(get_io()->state,
- devh, bmRequestType, bRequest, wValue, wIndex, data, wLength, timeout);
- return 0;
-}
-
-int __wrap_libusb_release_interface(libusb_device_handle *devh, int interface_number)
-{
- LOG_ME;
- return 0;
-}
-
-void __wrap_libusb_close(libusb_device_handle *devh)
-{
- LOG_ME;
-}
-
-void __wrap_libusb_exit(libusb_context *ctx)
-{
- LOG_ME;
-}
-
int main(void)
{
int ret = 0;