393 Commits

Author SHA1 Message Date
Sebastian Zagrodzki
5608fa49e7 remove superfluous imports 2017-03-10 07:09:12 -05:00
Sebastian Zagrodzki
a787d0a1d1 Modify the test for device list, drop noop/multiple contexts. 2017-03-10 07:08:35 -05:00
Sebastian Zagrodzki
c918a7e503 Skip the test, until rewritten. 2017-03-10 07:08:00 -05:00
Sebastian Zagrodzki
8af7ddc71b add two device descriptors 2017-03-10 07:07:44 -05:00
Sebastian Zagrodzki
c2776f302f Merge branch 'master' into libusb_wrappers_tests 2017-03-10 07:01:29 -05:00
zagrodzki
b5abadf3f0 Merge pull request #39 from kylelemons/libusb_wrappers
Libusb wrappers
2017-03-10 06:52:56 -05:00
Sebastian Zagrodzki
feddade9bf add coverage badge 2017-03-09 19:32:46 -05:00
Sebastian Zagrodzki
3b0b2f1a6b consistent skip message 2017-03-09 12:56:46 -05:00
Sebastian Zagrodzki
dcc298126a "-v" for the tests 2017-03-09 12:52:54 -05:00
Sebastian Zagrodzki
aaec52a9c3 more tests failing on travis 2017-03-09 12:43:08 -05:00
Sebastian Zagrodzki
a675c1b487 more tests failing on travis 2017-03-09 12:41:25 -05:00
Sebastian Zagrodzki
76721213eb Skip descriptor test on Travis. 2017-03-09 12:34:49 -05:00
Sebastian Zagrodzki
40d328967b Run all tests. I'll mark the always-failing tests as skipped. 2017-03-09 12:31:14 -05:00
Sebastian Zagrodzki
d6f93e15ab always create the tmp file 2017-03-09 12:28:58 -05:00
Sebastian Zagrodzki
9f8cb55a00 yet another way to escape... 2017-03-09 12:26:29 -05:00
Sebastian Zagrodzki
da066a3744 different escaping 2017-03-09 12:20:34 -05:00
Sebastian Zagrodzki
13a23edf37 go does not support coverage when testing multiple packages. 2017-03-09 12:17:50 -05:00
Sebastian Zagrodzki
5af7134a36 move the coveralls token to env 2017-03-09 12:09:05 -05:00
Sebastian Zagrodzki
fb2d1452c7 Add coveralls support to travis. 2017-03-09 12:03:45 -05:00
Sebastian Zagrodzki
0099228bc3 started adding fakelibusb functions for testing device.go 2017-03-06 11:38:03 +01:00
Sebastian Zagrodzki
810a98e9fa Revert "Run benchmarks for tests as well."
This reverts commit 7c55d36758.
2017-03-01 11:13:22 +01:00
Sebastian Zagrodzki
2c956c55d8 Revert "Gah. s/bench.run/test.bench/"
This reverts commit 42e4e1a37d.
2017-03-01 11:13:16 +01:00
Sebastian Zagrodzki
42e4e1a37d Gah. s/bench.run/test.bench/ 2017-03-01 11:04:41 +01:00
Sebastian Zagrodzki
7c55d36758 Run benchmarks for tests as well. 2017-03-01 10:58:34 +01:00
Sebastian Zagrodzki
bed02e9838 A benchmark on the trivial cgo call, to assess overhead of different
ways of calling out to cgo.
2017-03-01 10:51:17 +01:00
Sebastian Zagrodzki
2d51a51ec5 newEndpoint no longer references *Device, but receives individual values
extracted from the device. Makes testing easier.
2017-02-26 21:47:47 +01:00
Sebastian Zagrodzki
d0859b8c47 Pass all required info to newEndpoint. 2017-02-26 21:44:15 +01:00
Sebastian Zagrodzki
676cb78cae unwrap the nested ifs 2017-02-26 21:43:56 +01:00
Sebastian Zagrodzki
c0d81e08a8 use a shared fakelibusb for mocking 2017-02-26 21:14:04 +01:00
Sebastian Zagrodzki
8addfb562f updated submit interface and added data() method. 2017-02-26 21:13:31 +01:00
Sebastian Zagrodzki
9eebb871cb Use fake libusb. Add testcase descriptions. 2017-02-26 21:13:09 +01:00
Sebastian Zagrodzki
6caeb9d701 remove transferIntf, instead rely on transfer.go "usbTransfer", but with
a fake libusb xfer underneath.
2017-02-26 21:12:18 +01:00
Sebastian Zagrodzki
c2167157be Move transfer_fakelibusb to fakelibusb, used in other tests too.
Change the interface a bit.
2017-02-26 21:08:08 +01:00
Sebastian Zagrodzki
00dbfd23dd done channel is now initialized on submit.
add a data() method, to avoid reaching into any xfer fields.
2017-02-26 21:02:29 +01:00
zagrodzki
77a5315a11 Merge pull request #38 from kylelemons/context_race
Remove context close race condition
2017-02-24 17:32:22 +01:00
Sebastian Zagrodzki
69f9eb93e2 When terminating the Context, wait for the background goroutine
to sync on c.done channel before exiting.
2017-02-24 09:36:17 +01:00
Sebastian Zagrodzki
81e9253f49 no more C in transfer.go 2017-02-23 10:46:04 +01:00
Sebastian Zagrodzki
bf3b23ccd2 move all transfer C parts to libusb.go to alloc() 2017-02-23 10:45:35 +01:00
Sebastian Zagrodzki
21d53c9180 usb.go no longer needs "C" 2017-02-23 10:39:50 +01:00
Sebastian Zagrodzki
74b932b022 Duh, missing libusb.go... 2017-02-23 10:38:25 +01:00
Sebastian Zagrodzki
82184ea552 make libusbDevHandle part of alloc() 2017-02-23 10:29:24 +01:00
Sebastian Zagrodzki
cc135fe616 move all libusb wrappers to libusb.go. 2017-02-23 10:25:02 +01:00
zagrodzki
6afb417224 Merge pull request #36 from kylelemons/endpoint_tests
Endpoint tests
2017-02-22 23:57:55 +01:00
Sebastian Zagrodzki
577447ecbf s/newRealUSBTransfer/newLibUSBTransfer/ 2017-02-22 23:52:28 +01:00
Sebastian Zagrodzki
313ba15ee6 unexport read/write timeout. 2017-02-22 23:51:36 +01:00
Sebastian Zagrodzki
5fd1c33413 We now use subtests, introduced in Go 1.7. Remove 1.6 from compatibility
check.
2017-02-22 23:36:53 +01:00
Sebastian Zagrodzki
01ec3a240e use named receiver in all methods for nicer indentation. 2017-02-22 23:36:28 +01:00
Sebastian Zagrodzki
9fdd8c7eb8 Rename epSetup to epCfg. 2017-02-22 01:36:36 +01:00
Sebastian Zagrodzki
34c00f398b - more tests, for "out" endpoint. 2017-02-22 01:35:13 +01:00
Sebastian Zagrodzki
ea2d93bbca Merge branch 'master' into endpoint_tests 2017-02-22 01:04:45 +01:00