From 79c11d6008392b88d971d5dc5c98890558e80c49 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Tue, 4 Jul 2017 10:36:25 +0200 Subject: [PATCH] Skip test_configdata.test_init_benchmark on Travis in Docker See #2777 --- pytest.ini | 1 + scripts/dev/ci/travis_run.sh | 2 +- tests/conftest.py | 1 + tests/unit/config/test_configdata.py | 2 ++ 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/pytest.ini b/pytest.ini index a2d2779d9..2028c999f 100644 --- a/pytest.ini +++ b/pytest.ini @@ -14,6 +14,7 @@ markers = end2end: End to end tests which run qutebrowser as subprocess xfail_norun: xfail the test with out running it ci: Tests which should only run on CI. + no_ci: Tests which should not run on CI. qtwebengine_todo: Features still missing with QtWebEngine qtwebengine_skip: Tests not applicable with QtWebEngine qtwebkit_skip: Tests not applicable with QtWebKit diff --git a/scripts/dev/ci/travis_run.sh b/scripts/dev/ci/travis_run.sh index 6e148c088..fc4fde0fe 100644 --- a/scripts/dev/ci/travis_run.sh +++ b/scripts/dev/ci/travis_run.sh @@ -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 qutebrowser/travis:$DOCKER + docker run --privileged -v $PWD:/outside -e QUTE_BDD_WEBENGINE=$QUTE_BDD_WEBENGINE -e DOCKER=$DOCKER -e CI=$CI qutebrowser/travis:$DOCKER else args=() [[ $TESTENV == docs ]] && args=('--no-authors') diff --git a/tests/conftest.py b/tests/conftest.py index b8597c03f..bebe4e76f 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -59,6 +59,7 @@ def _apply_platform_markers(config, item): ('frozen', not getattr(sys, 'frozen', False), "Can only run when frozen"), ('ci', 'CI' not in os.environ, "Only runs on CI."), + ('no_ci', 'CI' in os.environ, "Skipped on CI."), ('issue2478', os.name == 'nt' and config.webengine, "Broken with QtWebEngine on Windows"), ] diff --git a/tests/unit/config/test_configdata.py b/tests/unit/config/test_configdata.py index 45d6bde19..27733f0a2 100644 --- a/tests/unit/config/test_configdata.py +++ b/tests/unit/config/test_configdata.py @@ -41,6 +41,8 @@ def test_init(config_stub): option.typ.to_str(option.default) +# https://github.com/qutebrowser/qutebrowser/issues/2777 +@pytest.mark.no_ci def test_init_benchmark(benchmark): benchmark(configdata.init)