mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Skip podofo tests on OS X travis
This commit is contained in:
parent
3f9dfc00db
commit
f42714c48f
@ -17,7 +17,7 @@ try:
|
|||||||
except ImportError:
|
except ImportError:
|
||||||
create_server_cert = None
|
create_server_cert = None
|
||||||
|
|
||||||
|
from calibre.constants import isosx
|
||||||
from calibre.srv.pre_activated import has_preactivated_support
|
from calibre.srv.pre_activated import has_preactivated_support
|
||||||
from calibre.srv.tests.base import BaseTest, TestServer
|
from calibre.srv.tests.base import BaseTest, TestServer
|
||||||
from calibre.ptempfile import TemporaryDirectory
|
from calibre.ptempfile import TemporaryDirectory
|
||||||
@ -187,6 +187,8 @@ class LoopTest(BaseTest):
|
|||||||
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM, 0)
|
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM, 0)
|
||||||
s.bind(('localhost', 0))
|
s.bind(('localhost', 0))
|
||||||
address = s.getsockname()[0]
|
address = s.getsockname()[0]
|
||||||
|
if is_travis and isosx:
|
||||||
|
address = '::1'
|
||||||
with TemporaryDirectory('srv-test-ssl') as tdir:
|
with TemporaryDirectory('srv-test-ssl') as tdir:
|
||||||
cert_file, key_file, ca_file = map(lambda x:os.path.join(tdir, x), 'cka')
|
cert_file, key_file, ca_file = map(lambda x:os.path.join(tdir, x), 'cka')
|
||||||
create_server_cert(address, ca_file, cert_file, key_file, key_size=1024)
|
create_server_cert(address, ca_file, cert_file, key_file, key_size=1024)
|
||||||
|
@ -59,11 +59,24 @@ class BuildTest(unittest.TestCase):
|
|||||||
test_dictionaries()
|
test_dictionaries()
|
||||||
|
|
||||||
def test_plugins(self):
|
def test_plugins(self):
|
||||||
|
exclusions = set()
|
||||||
|
if is_travis:
|
||||||
|
if isosx:
|
||||||
|
# The compiler version on OS X is different between the
|
||||||
|
# machine on which the dependencies are built and the
|
||||||
|
# machine on which the calibre modules are built, which causes
|
||||||
|
# C++ name mangling incompatibilities preventing some modules
|
||||||
|
# from loading
|
||||||
|
exclusions.update(set('podofo'.split()))
|
||||||
|
else:
|
||||||
|
# libusb fails to initialize in the travis container
|
||||||
|
exclusions.update(set('libusb libmtp'.split()))
|
||||||
for name in plugins:
|
for name in plugins:
|
||||||
if (is_travis and name in ('libusb', 'libmtp')):
|
if name in exclusions:
|
||||||
# libusb fails to initialize on travis, so just check that the
|
if not isosx:
|
||||||
# DLL can be loaded
|
# libusb fails to initialize on travis, so just check that the
|
||||||
ctypes.CDLL(os.path.join(sys.extensions_location, name + ('.dylib' if isosx else '.so')))
|
# DLL can be loaded
|
||||||
|
ctypes.CDLL(os.path.join(sys.extensions_location, name + ('.dylib' if isosx else '.so')))
|
||||||
continue
|
continue
|
||||||
mod, err = plugins[name]
|
mod, err = plugins[name]
|
||||||
self.assertFalse(err or not mod, 'Failed to load plugin: ' + name + ' with error:\n' + err)
|
self.assertFalse(err or not mod, 'Failed to load plugin: ' + name + ' with error:\n' + err)
|
||||||
@ -191,6 +204,7 @@ class BuildTest(unittest.TestCase):
|
|||||||
import psutil
|
import psutil
|
||||||
psutil.Process(os.getpid())
|
psutil.Process(os.getpid())
|
||||||
|
|
||||||
|
@unittest.skipIf(is_travis and isosx, 'Currently there is a C++ ABI incompatibility until the osx-build machine is moved to OS X 10.9')
|
||||||
def test_podofo(self):
|
def test_podofo(self):
|
||||||
from calibre.utils.podofo import test_podofo as dotest
|
from calibre.utils.podofo import test_podofo as dotest
|
||||||
dotest()
|
dotest()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user