2010/4/3 Xiaofan Chen <xiaof...@gmail.com>: > On Sun, Apr 4, 2010 at 10:39 AM, Xiaofan Chen <xiaof...@gmail.com> wrote: >> Since libusb-1.0 Windows backend is API compatible >> with libusb-1.0 under Linux, so I think it is already quite >> close to work. >> >> So I copied libusb-1.0.dll to c:\windows\system32 and then >> changed a few lines in libusb10.py. >> >>It seems to built, but then the test program failed. I think this >> is because the default libusb-1.0.dll is using stdcall calling convention. > > > So I rebuild libusb-1.0.dll with cdecl calling convention. > This time the test suite goes much further. I know this > is not a proper fix since libusb-1.0.dll will be using > stdcall calling convention. But this is just for testing.
I will fix that. > > The error is rather strange though. > > c:\pyusb\pyusb\tests>c:\Python26\python.exe testall.py > Adding BackendTest(usb.backend.libusb10) to test suite... > Adding BackendTest(usb.backend.libusb01) to test suite... > Adding DeviceTest(usb.backend.libusb10) to test suite... > Adding ConfigurationTest(usb.backend.libusb10) to test suite... > Adding InterfaceTest(usb.backend.libusb10) to test suite... > Adding EndpointTest(usb.backend.libusb10) to test suite... > EF........... > ====================================================================== > ERROR: runTest (test_backend.BackendTest) > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "c:\cygwin\home\mcuee\mcu\pyusb\pyusb\tests\test_backend.py", line 50, > in > runTest > self.test_open_device() > File "c:\cygwin\home\mcuee\mcu\pyusb\pyusb\tests\test_backend.py", line 120, > in test_open_device > self.handle = self.backend.open_device(self.dev) > File "c:\Python26\lib\site-packages\usb\backend\libusb10.py", line 415, in > open_device > _check(_lib.libusb_open(dev.devid, byref(handle))) > File "c:\Python26\lib\site-packages\usb\backend\libusb10.py", line 332, in > _check > raise USBError(_str_error[retval.value]) > USBError: Access denied (insufficient permissions) > > ====================================================================== > FAIL: runTest (test_backend.BackendTest) > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "c:\cygwin\home\mcuee\mcu\pyusb\pyusb\tests\test_backend.py", line 45, > in > runTest > self.test_enumerate_devices() > File "c:\cygwin\home\mcuee\mcu\pyusb\pyusb\tests\test_backend.py", line 68, > in > test_enumerate_devices > self.fail('PyUSB test device not found') > AssertionError: PyUSB test device not found When I port 1.0 windows backend, I will check. But maybe not in time for alpha 0 release. > > ---------------------------------------------------------------------- > Ran 13 tests in 0.390s > > FAILED (failures=1, errors=1) > > -- > Xiaofan http://mcuee.blogspot.com Thank you for all your effort testing PyUSB!! :) > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > pyusb-users mailing list > pyusb-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/pyusb-users > ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ pyusb-users mailing list pyusb-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pyusb-users