Parallelize tests (#17)

* Store a reference to libusb implementation in the context, transfers
and some more places. Remove the global libusb variable.

* Parallelize tests.

* Fix the link in README.
This commit is contained in:
zagrodzki
2017-09-04 16:55:47 +02:00
committed by GitHub
parent f9aba6fab5
commit c113a5e0de
15 changed files with 159 additions and 120 deletions

View File

@@ -17,7 +17,7 @@ package gousb
func (e *endpoint) newStream(size, count int, submit bool) (*stream, error) {
var ts []transferIntf
for i := 0; i < count; i++ {
t, err := newUSBTransfer(e.h, &e.Desc, size, e.Timeout)
t, err := newUSBTransfer(e.ctx, e.h, &e.Desc, size, e.Timeout)
if err != nil {
for _, t := range ts {
t.free()