diff --git a/scripts/dev/ci_run.py b/scripts/dev/ci_run.py index 42e12a3a6..c2298b8c1 100644 --- a/scripts/dev/ci_run.py +++ b/scripts/dev/ci_run.py @@ -55,10 +55,6 @@ elif travis_os == 'osx' and testenv == 'py34': if testenv == 'eslint': subprocess.check_call(['eslint', 'qutebrowser']) -elif testenv == 'py34' and travis_os == 'linux': - cmdline = ['xvfb-run', '-s', '-screen 0 640x480x16'] else: - cmdline = [] - -cmdline += ['tox', '-e', testenv, '--', '-p', 'no:sugar', 'tests'] -subprocess.check_call(cmdline) + cmdline = ['tox', '-e', testenv, '--', '-p', 'no:sugar', 'tests'] + subprocess.check_call(cmdline) diff --git a/tests/conftest.py b/tests/conftest.py index 79fa5b570..37e25d5bc 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -339,13 +339,19 @@ def fail_tests_on_warnings(): warnings.resetwarnings() +def pytest_addoption(parser): + parser.addoption('--no-xvfb', action='store_true', default=False, + help='Disable xvfb in tests.') + + def pytest_configure(config): """Start Xvfb if we're on Linux, not on a CI and Xvfb is available. This is a lot nicer than having windows popping up. """ config.xvfb_display = None - if sys.platform.startswith('linux') and 'CI' not in os.environ: + if sys.platform.startswith('linux') and not config.getoption('--no-xvfb'): + assert 'QUTE_BUILDBOT' not in os.environ try: disp = xvfbwrapper.Xvfb(width=800, height=600, colordepth=16) disp.start()