Commit Graph

  • 5608fa49e7 remove superfluous imports Sebastian Zagrodzki 2017-03-10 07:09:12 -05:00
  • a787d0a1d1 Modify the test for device list, drop noop/multiple contexts. Sebastian Zagrodzki 2017-03-10 07:08:35 -05:00
  • c918a7e503 Skip the test, until rewritten. Sebastian Zagrodzki 2017-03-10 07:08:00 -05:00
  • 8af7ddc71b add two device descriptors Sebastian Zagrodzki 2017-03-10 07:07:44 -05:00
  • c2776f302f Merge branch 'master' into libusb_wrappers_tests Sebastian Zagrodzki 2017-03-10 07:01:29 -05:00
  • b5abadf3f0 Merge pull request #39 from kylelemons/libusb_wrappers zagrodzki 2017-03-10 06:52:56 -05:00
  • 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
  • 77a5315a11 Merge pull request #38 from kylelemons/context_race zagrodzki 2017-02-24 17:32:22 +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
  • 6afb417224 Merge pull request #36 from kylelemons/endpoint_tests zagrodzki 2017-02-22 23:57:55 +01:00
  • 577447ecbf s/newRealUSBTransfer/newLibUSBTransfer/ Sebastian Zagrodzki 2017-02-22 23:52:28 +01:00
  • 313ba15ee6 unexport read/write timeout. Sebastian Zagrodzki 2017-02-22 23:51:36 +01:00
  • 5fd1c33413 We now use subtests, introduced in Go 1.7. Remove 1.6 from compatibility check. Sebastian Zagrodzki 2017-02-22 23:36:53 +01:00
  • 01ec3a240e use named receiver in all methods for nicer indentation. Sebastian Zagrodzki 2017-02-22 23:36:28 +01:00
  • 9fdd8c7eb8 Rename 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
  • ea2d93bbca Merge branch 'master' into endpoint_tests Sebastian Zagrodzki 2017-02-22 01:04:45 +01:00
  • 304c2feb85 Merge pull request #35 from kylelemons/transfer_tests zagrodzki 2017-02-22 01:03:48 +01:00
  • fc1be79d5d range xfers Sebastian Zagrodzki 2017-02-22 01:00:27 +01:00
  • 0e46520137 change test slightly, add test for write on in endpoint Sebastian Zagrodzki 2017-02-22 00:58:50 +01:00
  • c7c647e701 First tests. Sebastian Zagrodzki 2017-02-19 16:04:16 +01:00
  • 2efb1a354f Use newEndpoint() for initialization. Add an indirection for newUSBTransfer. Sebastian Zagrodzki 2017-02-19 15:35:35 +01:00
  • 360740e76c Cast libusb_transfer explicitly, to make Go 1.8 happy. Sebastian Zagrodzki 2017-02-18 18:13:22 +01:00
  • 8eaaee4223 Merge remote-tracking branch 'origin/master' into transfer_tests Sebastian Zagrodzki 2017-02-18 18:06:00 +01:00
  • 343c2fb252 Merge pull request #31 from kylelemons/windows_install_instructions zagrodzki 2017-02-17 17:06:52 +01:00
  • e1b305fe4f Merge pull request #32 from vincentserpoul/master zagrodzki 2017-02-17 09:21:31 +01:00
  • c95e06b5d4 authors vincentserpoul 2017-02-17 02:48:47 +08:00
  • 303eb08f98 comment nitpicking :) vincentserpoul 2017-02-17 02:48:05 +08:00
  • a431f86bcb comment grammar vincentserpoul 2017-02-17 02:28:24 +08:00
  • a97a027682 Merge branch 'master' of github.com:vincentserpoul/gousb vincentserpoul 2017-02-17 02:00:57 +08:00
  • 0a1a8e43cd error handling and bool handling vincentserpoul 2017-02-17 01:33:51 +08:00
  • d8e3995f7c improve comment vincentserpoul 2017-02-17 01:24:57 +08:00
  • 09dcccd0dd add bool handling vincentserpoul 2017-02-17 01:19:33 +08:00
  • 6586e027a6 remove systematic detach, add SetAutoDetach method vincentserpoul 2017-02-17 01:05:34 +08:00
  • 7c2897852d detach before claim vincentserpoul 2017-02-16 23:41:52 +08:00
  • f70c565a72 Merge pull request #33 from kylelemons/kylelemons-travis-update Kyle Lemons 2017-02-16 09:37:53 -08:00
  • 56fd0d1199 error handling and bool handling vincentserpoul 2017-02-17 01:33:51 +08:00
  • a6b5026fe9 Bump the Ubuntu and Go versions for Travis Kyle Lemons 2017-02-16 09:33:10 -08:00
  • b13a99c292 improve comment vincentserpoul 2017-02-17 01:24:57 +08:00
  • 16dcc99997 add bool handling vincentserpoul 2017-02-17 01:19:33 +08:00
  • c84750a9d7 remove systematic detach, add SetAutoDetach method vincentserpoul 2017-02-17 01:05:34 +08: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
  • 09150fc318 Merge pull request #28 from kylelemons/async_transfers_everywhere zagrodzki 2017-02-15 18:31:12 +01:00
  • ef932806ed more comments about transfer protocol. Sebastian Zagrodzki 2017-02-15 18:20:32 +01:00
  • 0ba09a9942 Move device handle to newUSBTransfer args, remove separate attach() Sebastian Zagrodzki 2017-02-14 01:24:20 +01:00
  • 16f99ed0b0 Merge remote-tracking branch 'origin/master' into async_transfers_everywhere Sebastian Zagrodzki 2017-02-14 01:12:35 +01:00
  • 8f68b3d966 Merge pull request #30 from kylelemons/pkg_config zagrodzki 2017-02-13 19:51:23 +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
  • d2b5956929 Merge pull request #27 from kylelemons/rawread_benchmark zagrodzki 2017-02-10 13:09:44 +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