5608fa49e7remove superfluous imports
Sebastian Zagrodzki
2017-03-10 07:09:12 -05:00
a787d0a1d1Modify the test for device list, drop noop/multiple contexts.
Sebastian Zagrodzki
2017-03-10 07:08:35 -05:00
c918a7e503Skip the test, until rewritten.
Sebastian Zagrodzki
2017-03-10 07:08:00 -05:00
8af7ddc71badd two device descriptors
Sebastian Zagrodzki
2017-03-10 07:07:44 -05:00
c2776f302fMerge branch 'master' into libusb_wrappers_tests
Sebastian Zagrodzki
2017-03-10 07:01:29 -05:00
b5abadf3f0Merge pull request #39 from kylelemons/libusb_wrappers
zagrodzki
2017-03-10 06:52:56 -05:00
feddade9bfadd coverage badge
Sebastian Zagrodzki
2017-03-09 19:32:46 -05:00
3b0b2f1a6bconsistent 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
aaec52a9c3more tests failing on travis
Sebastian Zagrodzki
2017-03-09 12:43:08 -05:00
a675c1b487more tests failing on travis
Sebastian Zagrodzki
2017-03-09 12:41:25 -05:00
76721213ebSkip descriptor test on Travis.
Sebastian Zagrodzki
2017-03-09 12:34:49 -05:00
40d328967bRun all tests. I'll mark the always-failing tests as skipped.
Sebastian Zagrodzki
2017-03-09 12:31:14 -05:00
d6f93e15abalways create the tmp file
Sebastian Zagrodzki
2017-03-09 12:28:58 -05:00
9f8cb55a00yet another way to escape...
Sebastian Zagrodzki
2017-03-09 12:26:29 -05:00
da066a3744different escaping
Sebastian Zagrodzki
2017-03-09 12:20:34 -05:00
13a23edf37go does not support coverage when testing multiple packages.
Sebastian Zagrodzki
2017-03-09 12:17:50 -05:00
5af7134a36move the coveralls token to env
Sebastian Zagrodzki
2017-03-09 12:09:05 -05:00
fb2d1452c7Add coveralls support to travis.
Sebastian Zagrodzki
2017-03-09 12:03:45 -05:00
0099228bc3started adding fakelibusb functions for testing device.go
Sebastian Zagrodzki
2017-03-06 11:38:03 +01:00
810a98e9faRevert "Run benchmarks for tests as well."
Sebastian Zagrodzki
2017-03-01 11:13:22 +01:00
2c956c55d8Revert "Gah. s/bench.run/test.bench/"
Sebastian Zagrodzki
2017-03-01 11:13:16 +01:00
42e4e1a37dGah. s/bench.run/test.bench/
Sebastian Zagrodzki
2017-03-01 11:04:41 +01:00
7c55d36758Run benchmarks for tests as well.
Sebastian Zagrodzki
2017-03-01 10:58:34 +01:00
bed02e9838A 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
2d51a51ec5newEndpoint 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
d0859b8c47Pass all required info to newEndpoint.
Sebastian Zagrodzki
2017-02-26 21:44:15 +01:00
676cb78caeunwrap the nested ifs
Sebastian Zagrodzki
2017-02-26 21:43:56 +01:00
c0d81e08a8use a shared fakelibusb for mocking
Sebastian Zagrodzki
2017-02-26 21:14:04 +01:00
8addfb562fupdated submit interface and added data() method.
Sebastian Zagrodzki
2017-02-26 21:13:31 +01:00
6caeb9d701remove transferIntf, instead rely on transfer.go "usbTransfer", but with a fake libusb xfer underneath.
Sebastian Zagrodzki
2017-02-26 21:12:18 +01:00
c2167157beMove transfer_fakelibusb to fakelibusb, used in other tests too. Change the interface a bit.
Sebastian Zagrodzki
2017-02-26 21:08:08 +01:00
00dbfd23dddone 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
77a5315a11Merge pull request #38 from kylelemons/context_race
zagrodzki
2017-02-24 17:32:22 +01:00
69f9eb93e2When 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
81e9253f49no more C in transfer.go
Sebastian Zagrodzki
2017-02-23 10:46:04 +01:00
bf3b23ccd2move all transfer C parts to libusb.go to alloc()
Sebastian Zagrodzki
2017-02-23 10:45:35 +01:00
21d53c9180usb.go no longer needs "C"
Sebastian Zagrodzki
2017-02-23 10:39:50 +01:00
74b932b022Duh, missing libusb.go...
Sebastian Zagrodzki
2017-02-23 10:38:25 +01:00
82184ea552make libusbDevHandle part of alloc()
Sebastian Zagrodzki
2017-02-23 10:29:24 +01:00
cc135fe616move all libusb wrappers to libusb.go.
Sebastian Zagrodzki
2017-02-23 10:25:02 +01:00
6afb417224Merge pull request #36 from kylelemons/endpoint_tests
zagrodzki
2017-02-22 23:57:55 +01:00
577447ecbfs/newRealUSBTransfer/newLibUSBTransfer/
Sebastian Zagrodzki
2017-02-22 23:52:28 +01:00
313ba15ee6unexport read/write timeout.
Sebastian Zagrodzki
2017-02-22 23:51:36 +01:00
5fd1c33413We now use subtests, introduced in Go 1.7. Remove 1.6 from compatibility check.
Sebastian Zagrodzki
2017-02-22 23:36:53 +01:00
01ec3a240euse named receiver in all methods for nicer indentation.
Sebastian Zagrodzki
2017-02-22 23:36:28 +01:00
9fdd8c7eb8Rename epSetup to epCfg.
Sebastian Zagrodzki
2017-02-22 01:36:27 +01:00
34c00f398b- more tests, for "out" endpoint.
Sebastian Zagrodzki
2017-02-22 01:35:13 +01:00
ea2d93bbcaMerge branch 'master' into endpoint_tests
Sebastian Zagrodzki
2017-02-22 01:04:45 +01:00
304c2feb85Merge pull request #35 from kylelemons/transfer_tests
zagrodzki
2017-02-22 01:03:48 +01:00
fc1be79d5drange xfers
Sebastian Zagrodzki
2017-02-22 01:00:27 +01:00
0e46520137change test slightly, add test for write on in endpoint
Sebastian Zagrodzki
2017-02-22 00:58:50 +01:00
c7c647e701First tests.
Sebastian Zagrodzki
2017-02-19 16:04:16 +01:00
2efb1a354fUse newEndpoint() for initialization. Add an indirection for newUSBTransfer.
Sebastian Zagrodzki
2017-02-19 15:35:35 +01:00
360740e76cCast libusb_transfer explicitly, to make Go 1.8 happy.
Sebastian Zagrodzki
2017-02-18 18:13:22 +01:00
8eaaee4223Merge remote-tracking branch 'origin/master' into transfer_tests
Sebastian Zagrodzki
2017-02-18 18:06:00 +01:00
343c2fb252Merge pull request #31 from kylelemons/windows_install_instructions
zagrodzki
2017-02-17 17:06:52 +01:00
e1b305fe4fMerge pull request #32 from vincentserpoul/master
zagrodzki
2017-02-17 09:21:31 +01:00
a7f2e81ddfdetach before claim
vincentserpoul
2017-02-16 23:41:52 +08:00
fce1a48ebaEndpoint no longer needs cgo.
Sebastian Zagrodzki
2017-02-16 12:05:48 +01:00
99ec211c43Improve 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
94878756d0instructions for windows are simpler now that we use pkgconfig.
Sebastian Zagrodzki
2017-02-15 20:31:16 +01:00
09150fc318Merge pull request #28 from kylelemons/async_transfers_everywhere
zagrodzki
2017-02-15 18:31:12 +01:00
ef932806edmore comments about transfer protocol.
Sebastian Zagrodzki
2017-02-15 18:20:32 +01:00
0ba09a9942Move device handle to newUSBTransfer args, remove separate attach()
Sebastian Zagrodzki
2017-02-14 01:24:20 +01:00
16f99ed0b0Merge remote-tracking branch 'origin/master' into async_transfers_everywhere
Sebastian Zagrodzki
2017-02-14 01:12:35 +01:00
8f68b3d966Merge pull request #30 from kylelemons/pkg_config
zagrodzki
2017-02-13 19:51:23 +01:00
1b4014cb28Set 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
d4d7011a44Don'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
e9d2ce49f0Add missing attach.
Sebastian Zagrodzki
2017-02-13 03:17:29 +01:00
931a15849bset the same channel in t.xfer.user_data as in t.done.
Sebastian Zagrodzki
2017-02-13 03:14:38 +01:00
ea1db2d56amove to updated transfer init protocol
Sebastian Zagrodzki
2017-02-13 03:02:32 +01:00
4a64c18350move newUSBTransfer as a vanilla function to transfer.go. Initialize all static params at new.
Sebastian Zagrodzki
2017-02-13 03:01:30 +01:00
a47809fda8Simplify 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
83a4778988wait() does not need the buffer passed explicitly, it's already stored in t.buf.
Sebastian Zagrodzki
2017-02-10 22:32:16 +01:00
1860441a7biso.go is no longer needed, the only iso-specific part lives in transfer.c
Sebastian Zagrodzki
2017-02-10 22:12:21 +01:00
31b3ac1c67move 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
d7ed6d67e6Rename iso_callback to transfer_callback, it's used for all transfer types.
Sebastian Zagrodzki
2017-02-10 22:08:39 +01:00
87abb704d7Make 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
c9c2757fe6Replace the libusb_bulk_transfer with the same prepare-submit-wait routine iso transfers use.
Sebastian Zagrodzki
2017-02-10 21:46:12 +01:00
9e50cd8c1cRename 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
9018981e65Merge remote-tracking branch 'origin/master' into async_transfers_everywhere
Sebastian Zagrodzki
2017-02-10 13:16:04 +01:00
d2b5956929Merge pull request #27 from kylelemons/rawread_benchmark
zagrodzki
2017-02-10 13:09:44 +01:00
0588c4e512Remove 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