mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 18:24:30 -04:00
Better exclusion rule for libusb test
This commit is contained in:
parent
6effd4f2ee
commit
0a5a13afb8
@ -68,14 +68,13 @@ class BuildTest(unittest.TestCase):
|
|||||||
# C++ name mangling incompatibilities preventing some modules
|
# C++ name mangling incompatibilities preventing some modules
|
||||||
# from loading
|
# from loading
|
||||||
exclusions.update(set('podofo'.split()))
|
exclusions.update(set('podofo'.split()))
|
||||||
else:
|
if islinux and (not os.path.exists('/dev/bus/usb') and not os.path.exists('/proc/bus/usb')):
|
||||||
# libusb fails to initialize in the travis container
|
# libusb fails to initialize in containers without USB subsystems
|
||||||
exclusions.update(set('libusb libmtp'.split()))
|
exclusions.update(set('libusb libmtp'.split()))
|
||||||
for name in plugins:
|
for name in plugins:
|
||||||
if name in exclusions:
|
if name in exclusions:
|
||||||
if not isosx:
|
if name in ('libusb', 'libmtp'):
|
||||||
# libusb fails to initialize on travis, so just check that the
|
# Just check that the DLL can be loaded
|
||||||
# DLL can be loaded
|
|
||||||
ctypes.CDLL(os.path.join(sys.extensions_location, name + ('.dylib' if isosx else '.so')))
|
ctypes.CDLL(os.path.join(sys.extensions_location, name + ('.dylib' if isosx else '.so')))
|
||||||
continue
|
continue
|
||||||
mod, err = plugins[name]
|
mod, err = plugins[name]
|
||||||
@ -244,7 +243,7 @@ class TestRunner(unittest.main):
|
|||||||
self.test = find_tests()
|
self.test = find_tests()
|
||||||
|
|
||||||
def test():
|
def test():
|
||||||
result = TestRunner(verbosity=2, buffer=True, catchbreak=True, failfast=True, argv=sys.argv[:1], exit=False).result
|
result = TestRunner(verbosity=2, buffer=True, catchbreak=True, failfast=False, argv=sys.argv[:1], exit=False).result
|
||||||
if not result.wasSuccessful():
|
if not result.wasSuccessful():
|
||||||
raise SystemExit(1)
|
raise SystemExit(1)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user