Check for YAML C extensions on Travis

See #2777
This commit is contained in:
Florian Bruhin 2017-10-11 11:04:32 +02:00
parent 35335d954b
commit 1a8de3b504
2 changed files with 8 additions and 1 deletions

View File

@ -1,7 +1,7 @@
#!/bin/bash
if [[ $DOCKER ]]; then
docker run --privileged -v "$PWD:/outside" -e "QUTE_BDD_WEBENGINE=$QUTE_BDD_WEBENGINE" -e "DOCKER=$DOCKER" -e "CI=$CI" "qutebrowser/travis:$DOCKER"
docker run --privileged -v "$PWD:/outside" -e "QUTE_BDD_WEBENGINE=$QUTE_BDD_WEBENGINE" -e "DOCKER=$DOCKER" -e "CI=$CI" -e "TRAVIS=$TRAVIS" "qutebrowser/travis:$DOCKER"
elif [[ $TESTENV == eslint ]]; then
# Can't run this via tox as we can't easily install tox in the javascript travis env
cd qutebrowser/javascript || exit 1

View File

@ -224,6 +224,13 @@ def apply_fake_os(monkeypatch, request):
monkeypatch.setattr('qutebrowser.utils.utils.is_posix', posix)
@pytest.fixture(scope='session', autouse=True)
def check_yaml_c_exts():
"""Make sure PyYAML C extensions are available on Travis."""
if 'TRAVIS' in os.environ:
from yaml import CLoader
@pytest.hookimpl(tryfirst=True, hookwrapper=True)
def pytest_runtest_makereport(item, call):
"""Make test information available in fixtures.