feddade9bf
add coverage badge
Sebastian Zagrodzki
2017-03-09 19:32:46 -05:00
3b0b2f1a6b
consistent skip message
Sebastian Zagrodzki
2017-03-09 12:56:46 -05:00
dcc298126a
"-v" for the tests
Sebastian Zagrodzki
2017-03-09 12:52:54 -05:00
aaec52a9c3
more tests failing on travis
Sebastian Zagrodzki
2017-03-09 12:43:08 -05:00
a675c1b487
more tests failing on travis
Sebastian Zagrodzki
2017-03-09 12:41:25 -05:00
76721213eb
Skip descriptor test on Travis.
Sebastian Zagrodzki
2017-03-09 12:34:49 -05:00
40d328967b
Run all tests. I'll mark the always-failing tests as skipped.
Sebastian Zagrodzki
2017-03-09 12:31:14 -05:00
d6f93e15ab
always create the tmp file
Sebastian Zagrodzki
2017-03-09 12:28:58 -05:00
9f8cb55a00
yet another way to escape...
Sebastian Zagrodzki
2017-03-09 12:26:29 -05:00
da066a3744
different escaping
Sebastian Zagrodzki
2017-03-09 12:20:34 -05:00
13a23edf37
go does not support coverage when testing multiple packages.
Sebastian Zagrodzki
2017-03-09 12:17:50 -05:00
5af7134a36
move the coveralls token to env
Sebastian Zagrodzki
2017-03-09 12:09:05 -05:00
fb2d1452c7
Add coveralls support to travis.
Sebastian Zagrodzki
2017-03-09 12:03:45 -05:00
0099228bc3
started adding fakelibusb functions for testing device.go
Sebastian Zagrodzki
2017-03-06 11:38:03 +01:00
810a98e9fa
Revert "Run benchmarks for tests as well."
Sebastian Zagrodzki
2017-03-01 11:13:22 +01:00
2c956c55d8
Revert "Gah. s/bench.run/test.bench/"
Sebastian Zagrodzki
2017-03-01 11:13:16 +01:00
42e4e1a37d
Gah. s/bench.run/test.bench/
Sebastian Zagrodzki
2017-03-01 11:04:41 +01:00
7c55d36758
Run benchmarks for tests as well.
Sebastian Zagrodzki
2017-03-01 10:58:34 +01:00
bed02e9838
A benchmark on the trivial cgo call, to assess overhead of different ways of calling out to cgo.
Sebastian Zagrodzki
2017-03-01 10:51:17 +01:00
2d51a51ec5
newEndpoint no longer references *Device, but receives individual values extracted from the device. Makes testing easier.
Sebastian Zagrodzki
2017-02-26 21:47:47 +01:00
d0859b8c47
Pass all required info to newEndpoint.
Sebastian Zagrodzki
2017-02-26 21:44:15 +01:00
676cb78cae
unwrap the nested ifs
Sebastian Zagrodzki
2017-02-26 21:43:56 +01:00
c0d81e08a8
use a shared fakelibusb for mocking
Sebastian Zagrodzki
2017-02-26 21:14:04 +01:00
8addfb562f
updated submit interface and added data() method.
Sebastian Zagrodzki
2017-02-26 21:13:31 +01:00
9eebb871cb
Use fake libusb. Add testcase descriptions.
Sebastian Zagrodzki
2017-02-26 21:13:09 +01:00
6caeb9d701
remove transferIntf, instead rely on transfer.go "usbTransfer", but with a fake libusb xfer underneath.
Sebastian Zagrodzki
2017-02-26 21:12:18 +01:00
c2167157be
Move transfer_fakelibusb to fakelibusb, used in other tests too. Change the interface a bit.
Sebastian Zagrodzki
2017-02-26 21:08:08 +01:00
00dbfd23dd
done channel is now initialized on submit. add a data() method, to avoid reaching into any xfer fields.
Sebastian Zagrodzki
2017-02-26 21:02:29 +01:00
69f9eb93e2
When terminating the Context, wait for the background goroutine to sync on c.done channel before exiting.
Sebastian Zagrodzki
2017-02-24 09:36:17 +01:00
81e9253f49
no more C in transfer.go
Sebastian Zagrodzki
2017-02-23 10:46:04 +01:00
bf3b23ccd2
move all transfer C parts to libusb.go to alloc()
Sebastian Zagrodzki
2017-02-23 10:45:35 +01:00
21d53c9180
usb.go no longer needs "C"
Sebastian Zagrodzki
2017-02-23 10:39:50 +01:00
74b932b022
Duh, missing libusb.go...
Sebastian Zagrodzki
2017-02-23 10:38:25 +01:00
82184ea552
make libusbDevHandle part of alloc()
Sebastian Zagrodzki
2017-02-23 10:29:24 +01:00
cc135fe616
move all libusb wrappers to libusb.go.
Sebastian Zagrodzki
2017-02-23 10:25:02 +01:00
a7f2e81ddf
detach before claim
vincentserpoul
2017-02-16 23:41:52 +08:00
fce1a48eba
Endpoint no longer needs cgo.
Sebastian Zagrodzki
2017-02-16 12:05:48 +01:00
99ec211c43
Improve tests - use offsetof to find the position of the iso packet descriptor in the transfer struct.
Sebastian Zagrodzki
2017-02-16 12:04:10 +01:00
94878756d0
instructions for windows are simpler now that we use pkgconfig.
Sebastian Zagrodzki
2017-02-15 20:31:16 +01:00
1b4014cb28
Set the pointer type, to make the compiler happy, otherwise it might complain about the incompatible pointer types.
Sebastian Zagrodzki
2017-02-13 19:14:43 +01:00
d4d7011a44
Don't assume libusb headers are always in libusb-1.0. Use pkg-config to add correct include paths for libusb regardless of the platform.
Sebastian Zagrodzki
2017-02-13 17:08:46 +01:00
e9d2ce49f0
Add missing attach.
Sebastian Zagrodzki
2017-02-13 03:17:29 +01:00
931a15849b
set the same channel in t.xfer.user_data as in t.done.
Sebastian Zagrodzki
2017-02-13 03:14:38 +01:00
ea1db2d56a
move to updated transfer init protocol
Sebastian Zagrodzki
2017-02-13 03:02:32 +01:00
4a64c18350
move newUSBTransfer as a vanilla function to transfer.go. Initialize all static params at new.
Sebastian Zagrodzki
2017-02-13 03:01:30 +01:00
a47809fda8
Simplify the C part even more - the buffer that xfer uses for transferring data is the same as the one that was created in newUSBTransfer.
Sebastian Zagrodzki
2017-02-13 02:50:47 +01:00
83a4778988
wait() does not need the buffer passed explicitly, it's already stored in t.buf.
Sebastian Zagrodzki
2017-02-10 22:32:16 +01:00
1860441a7b
iso.go is no longer needed, the only iso-specific part lives in transfer.c
Sebastian Zagrodzki
2017-02-10 22:12:21 +01:00
31b3ac1c67
move iso.c to transfer.c, as it's used for all transfers. move transfer callback to transfer.go.
Sebastian Zagrodzki
2017-02-10 22:11:54 +01:00
d7ed6d67e6
Rename iso_callback to transfer_callback, it's used for all transfer types.
Sebastian Zagrodzki
2017-02-10 22:08:39 +01:00
87abb704d7
Make all transfer types use a generic endpoint.transfer() function that uses libusb's asynchronous interface.
Sebastian Zagrodzki
2017-02-10 22:06:57 +01:00
c9c2757fe6
Replace the libusb_bulk_transfer with the same prepare-submit-wait routine iso transfers use.
Sebastian Zagrodzki
2017-02-10 21:46:12 +01:00
9e50cd8c1c
Rename extract_data to extract_iso_data, add extract_data for use by other transfer types.
Sebastian Zagrodzki
2017-02-10 21:45:26 +01:00
9018981e65
Merge remote-tracking branch 'origin/master' into async_transfers_everywhere
Sebastian Zagrodzki
2017-02-10 13:16:04 +01:00
0588c4e512
Remove the bench option, add num_reads instead for controlling how many reads to send. Default is read forever.
Sebastian Zagrodzki
2017-02-10 13:02:48 +01:00