From 8d10046fc810160dd4e2aabdbcc6601762a7cbce Mon Sep 17 00:00:00 2001 From: Markus Unterwaditzer Date: Wed, 15 Feb 2017 20:30:00 +0100 Subject: [PATCH] Don't run tests multiple times (#556) Fix #554 --- .travis.yml | 98 ++++++++++++++++++++++++++++---------- Makefile | 12 ++++- scripts/make_travisconf.py | 16 ++----- 3 files changed, 87 insertions(+), 39 deletions(-) diff --git a/.travis.yml b/.travis.yml index eb316be..652fa48 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,103 +18,151 @@ "matrix": { "include": [ { - "env": "BUILD=style BUILD_PRS=true", + "env": "BUILD=style", "python": "3.6" }, { - "env": "BUILD=test DAV_SERVER=radicale REQUIREMENTS=devel BUILD_PRS=false", + "env": "BUILD=test DAV_SERVER=skip REQUIREMENTS=devel ", "python": "3.3" }, { - "env": "BUILD=test DAV_SERVER=radicale REQUIREMENTS=release BUILD_PRS=false", + "env": "BUILD=test DAV_SERVER=skip REQUIREMENTS=release ", "python": "3.3" }, { - "env": "BUILD=test DAV_SERVER=radicale REQUIREMENTS=minimal BUILD_PRS=false", + "env": "BUILD=test DAV_SERVER=skip REQUIREMENTS=minimal ", "python": "3.3" }, { - "env": "BUILD=test DAV_SERVER=radicale REQUIREMENTS=devel BUILD_PRS=false", + "env": "BUILD=test DAV_SERVER=radicale REQUIREMENTS=devel ", + "python": "3.3" + }, + { + "env": "BUILD=test DAV_SERVER=radicale REQUIREMENTS=release ", + "python": "3.3" + }, + { + "env": "BUILD=test DAV_SERVER=radicale REQUIREMENTS=minimal ", + "python": "3.3" + }, + { + "env": "BUILD=test DAV_SERVER=skip REQUIREMENTS=devel ", "python": "3.4" }, { - "env": "BUILD=test DAV_SERVER=radicale REQUIREMENTS=release BUILD_PRS=false", + "env": "BUILD=test DAV_SERVER=skip REQUIREMENTS=release ", "python": "3.4" }, { - "env": "BUILD=test DAV_SERVER=radicale REQUIREMENTS=minimal BUILD_PRS=false", + "env": "BUILD=test DAV_SERVER=skip REQUIREMENTS=minimal ", "python": "3.4" }, { - "env": "BUILD=test DAV_SERVER=radicale REQUIREMENTS=devel BUILD_PRS=false", + "env": "BUILD=test DAV_SERVER=radicale REQUIREMENTS=devel ", + "python": "3.4" + }, + { + "env": "BUILD=test DAV_SERVER=radicale REQUIREMENTS=release ", + "python": "3.4" + }, + { + "env": "BUILD=test DAV_SERVER=radicale REQUIREMENTS=minimal ", + "python": "3.4" + }, + { + "env": "BUILD=test DAV_SERVER=skip REQUIREMENTS=devel ", "python": "3.5" }, { - "env": "BUILD=test DAV_SERVER=radicale REQUIREMENTS=release BUILD_PRS=false", + "env": "BUILD=test DAV_SERVER=skip REQUIREMENTS=release ", "python": "3.5" }, { - "env": "BUILD=test DAV_SERVER=radicale REQUIREMENTS=minimal BUILD_PRS=false", + "env": "BUILD=test DAV_SERVER=skip REQUIREMENTS=minimal ", "python": "3.5" }, { - "env": "BUILD=test DAV_SERVER=radicale REQUIREMENTS=devel BUILD_PRS=true", + "env": "BUILD=test DAV_SERVER=radicale REQUIREMENTS=devel ", + "python": "3.5" + }, + { + "env": "BUILD=test DAV_SERVER=radicale REQUIREMENTS=release ", + "python": "3.5" + }, + { + "env": "BUILD=test DAV_SERVER=radicale REQUIREMENTS=minimal ", + "python": "3.5" + }, + { + "env": "BUILD=test DAV_SERVER=skip REQUIREMENTS=devel ", "python": "3.6" }, { - "env": "BUILD=test DAV_SERVER=radicale REQUIREMENTS=release BUILD_PRS=true", + "env": "BUILD=test DAV_SERVER=skip REQUIREMENTS=release ", "python": "3.6" }, { - "env": "BUILD=test DAV_SERVER=radicale REQUIREMENTS=minimal BUILD_PRS=true", + "env": "BUILD=test DAV_SERVER=skip REQUIREMENTS=minimal ", "python": "3.6" }, { - "env": "BUILD=test DAV_SERVER=owncloud REQUIREMENTS=devel BUILD_PRS=false", + "env": "BUILD=test DAV_SERVER=radicale REQUIREMENTS=devel ", "python": "3.6" }, { - "env": "BUILD=test DAV_SERVER=owncloud REQUIREMENTS=release BUILD_PRS=false", + "env": "BUILD=test DAV_SERVER=radicale REQUIREMENTS=release ", "python": "3.6" }, { - "env": "BUILD=test DAV_SERVER=owncloud REQUIREMENTS=minimal BUILD_PRS=false", + "env": "BUILD=test DAV_SERVER=radicale REQUIREMENTS=minimal ", "python": "3.6" }, { - "env": "BUILD=test DAV_SERVER=nextcloud REQUIREMENTS=devel BUILD_PRS=false", + "env": "BUILD=test DAV_SERVER=owncloud REQUIREMENTS=devel ", "python": "3.6" }, { - "env": "BUILD=test DAV_SERVER=nextcloud REQUIREMENTS=release BUILD_PRS=false", + "env": "BUILD=test DAV_SERVER=owncloud REQUIREMENTS=release ", "python": "3.6" }, { - "env": "BUILD=test DAV_SERVER=nextcloud REQUIREMENTS=minimal BUILD_PRS=false", + "env": "BUILD=test DAV_SERVER=owncloud REQUIREMENTS=minimal ", "python": "3.6" }, { - "env": "BUILD=test DAV_SERVER=baikal REQUIREMENTS=devel BUILD_PRS=false", + "env": "BUILD=test DAV_SERVER=nextcloud REQUIREMENTS=devel ", "python": "3.6" }, { - "env": "BUILD=test DAV_SERVER=baikal REQUIREMENTS=release BUILD_PRS=false", + "env": "BUILD=test DAV_SERVER=nextcloud REQUIREMENTS=release ", "python": "3.6" }, { - "env": "BUILD=test DAV_SERVER=baikal REQUIREMENTS=minimal BUILD_PRS=false", + "env": "BUILD=test DAV_SERVER=nextcloud REQUIREMENTS=minimal ", "python": "3.6" }, { - "env": "BUILD=test DAV_SERVER=davical REQUIREMENTS=devel BUILD_PRS=false", + "env": "BUILD=test DAV_SERVER=baikal REQUIREMENTS=devel ", "python": "3.6" }, { - "env": "BUILD=test DAV_SERVER=davical REQUIREMENTS=release BUILD_PRS=false", + "env": "BUILD=test DAV_SERVER=baikal REQUIREMENTS=release ", "python": "3.6" }, { - "env": "BUILD=test DAV_SERVER=davical REQUIREMENTS=minimal BUILD_PRS=false", + "env": "BUILD=test DAV_SERVER=baikal REQUIREMENTS=minimal ", + "python": "3.6" + }, + { + "env": "BUILD=test DAV_SERVER=davical REQUIREMENTS=devel ", + "python": "3.6" + }, + { + "env": "BUILD=test DAV_SERVER=davical REQUIREMENTS=release ", + "python": "3.6" + }, + { + "env": "BUILD=test DAV_SERVER=davical REQUIREMENTS=minimal ", "python": "3.6" }, { diff --git a/Makefile b/Makefile index d290af6..acba223 100644 --- a/Makefile +++ b/Makefile @@ -9,6 +9,14 @@ export CI := false export COVERAGE := $(CI) export DETERMINISTIC_TESTS := false +PYTEST_ARGS = +ifneq ($(DAV_SERVER), skip) + PYTEST_ARGS += tests/storage/dav +endif +ifneq ($(REMOTESTORAGE_SERVER), skip) + PYTEST_ARGS += tests/storage/test_remotestorage.py +endif + all: $(error Take a look at https://vdirsyncer.pimutils.org/en/stable/tutorial.html#installation) @@ -34,9 +42,9 @@ install-test: install-servers test: set -e; \ if [ "$(COVERAGE)" = "true" ]; then \ - py.test --cov-config .coveragerc --cov vdirsyncer; \ + py.test --cov-config .coveragerc --cov vdirsyncer $(PYTEST_ARGS); \ else \ - py.test; \ + py.test $(PYTEST_ARGS); \ fi after-test: diff --git a/scripts/make_travisconf.py b/scripts/make_travisconf.py index 7dc31bc..26512be 100644 --- a/scripts/make_travisconf.py +++ b/scripts/make_travisconf.py @@ -34,17 +34,17 @@ cfg['matrix'] = {'include': matrix} matrix.append({ 'python': latest_python, - 'env': 'BUILD=style BUILD_PRS=true' + 'env': 'BUILD=style' }) for python in python_versions: if python == latest_python: - dav_servers = ("radicale", "owncloud", "nextcloud", "baikal", + dav_servers = ("skip", "radicale", "owncloud", "nextcloud", "baikal", "davical") rs_servers = () else: - dav_servers = ("radicale",) + dav_servers = ("skip", "radicale") rs_servers = () for (server_type, server), requirements in itertools.product( @@ -54,22 +54,14 @@ for python in python_versions: ), ("devel", "release", "minimal") ): - build_prs = ( - python == latest_python and - server_type == 'DAV' and - server == 'radicale' - ) - matrix.append({ 'python': python, 'env': ("BUILD=test " "{server_type}_SERVER={server} " "REQUIREMENTS={requirements} " - "BUILD_PRS={build_prs}" .format(server_type=server_type, server=server, - requirements=requirements, - build_prs='true' if build_prs else 'false')) + requirements=requirements)) }) matrix.append({