mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
As best as I can tell from reading Qt sourcecode, as long as QT_PLUGIN_PATH is set, it should just work. So only call ensure_app() on travis and nowhere else
This commit is contained in:
parent
c4cc4b386d
commit
9c1498d4ca
@ -6,5 +6,6 @@ env:
|
|||||||
|
|
||||||
before_install:
|
before_install:
|
||||||
- curl https://download.calibre-ebook.com/travis/sw-linux.tar.xz | tar xJ -C $HOME
|
- curl https://download.calibre-ebook.com/travis/sw-linux.tar.xz | tar xJ -C $HOME
|
||||||
|
- python -c "from PyQt5.QtCore import QCoreApplication; print(QCoreApplication.libraryPaths())"
|
||||||
- python setup.py bootstrap --ephemeral
|
- python setup.py bootstrap --ephemeral
|
||||||
script: python setup.py test
|
script: python setup.py test
|
||||||
|
@ -4,9 +4,10 @@
|
|||||||
|
|
||||||
from __future__ import (unicode_literals, division, absolute_import,
|
from __future__ import (unicode_literals, division, absolute_import,
|
||||||
print_function)
|
print_function)
|
||||||
import unittest
|
import unittest, os
|
||||||
|
|
||||||
from setup import Command
|
from setup import Command
|
||||||
|
is_travis = os.environ.get('TRAVIS') == 'true'
|
||||||
|
|
||||||
TEST_MODULES = frozenset('srv db polish opf css docx cfi matcher icu smartypants build'.split())
|
TEST_MODULES = frozenset('srv db polish opf css docx cfi matcher icu smartypants build'.split())
|
||||||
|
|
||||||
@ -78,8 +79,9 @@ class Test(Command):
|
|||||||
|
|
||||||
def run(self, opts):
|
def run(self, opts):
|
||||||
from calibre.utils.run_tests import run_cli, filter_tests_by_name
|
from calibre.utils.run_tests import run_cli, filter_tests_by_name
|
||||||
from calibre.gui2 import ensure_app
|
if is_travis:
|
||||||
ensure_app()
|
from calibre.gui2 import ensure_app
|
||||||
|
ensure_app()
|
||||||
tests = find_tests(which_tests=frozenset(opts.test_module))
|
tests = find_tests(which_tests=frozenset(opts.test_module))
|
||||||
if opts.test_name:
|
if opts.test_name:
|
||||||
tests = filter_tests_by_name(tests, *opts.test_name)
|
tests = filter_tests_by_name(tests, *opts.test_name)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user