From 138c8f00a0a752cbf8c72f2641a6499ce3dcbfa5 Mon Sep 17 00:00:00 2001 From: Markus Unterwaditzer Date: Sun, 20 Sep 2015 01:57:06 +0200 Subject: [PATCH] Revamp tests once again --- .travis.yml | 4 ++-- Makefile | 17 ++++++++--------- tests/storage/dav/servers/radicale/install.sh | 7 +++++-- 3 files changed, 15 insertions(+), 13 deletions(-) diff --git a/.travis.yml b/.travis.yml index bd7a0ae..c816565 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,8 +6,8 @@ python: - "3.3" - "3.4" env: - - BUILD=test DAV_SERVER=radicale RADICALE_BACKEND=filesystem REQUIREMENTS=release - # Radicale with filesystem storage (default) + - BUILD=test + # Default build, see Makefile - BUILD=test DAV_SERVER=radicale RADICALE_BACKEND=filesystem REQUIREMENTS=release PKGS='lxml==3.0 requests==2.4.1 requests_toolbelt==0.4.0 click==5.0' diff --git a/Makefile b/Makefile index 570dc5e..104f9fc 100644 --- a/Makefile +++ b/Makefile @@ -11,11 +11,11 @@ # If you want to skip the DAV tests against Radicale, use: # make DAV_SERVER=skip # ... -DAV_SERVER = radicale -REQUIREMENTS = release -TESTSERVER_BASE = ./tests/storage/dav/servers/ -TRAVIS = false -PIP_INSTALL = pip install +export DAV_SERVER := radicale +export RADICALE_BACKEND := filesystem +export REQUIREMENTS := release +export TESTSERVER_BASE := ./tests/storage/dav/servers/ +export TRAVIS := false install-davserver: set -e; \ @@ -28,8 +28,8 @@ install-davserver: cd $(TESTSERVER_BASE)$(DAV_SERVER) && sh install.sh install-test: install-davserver - $(PIP_INSTALL) pytest pytest-xprocess pytest-localserver - [ $(TRAVIS) != "true" ] || $(PIP_INSTALL) coverage coveralls + pip install pytest pytest-xprocess pytest-localserver + [ $(TRAVIS) != "true" ] || pip install coverage coveralls test: set -e; \ @@ -60,11 +60,10 @@ sh: # open subshell with default test config linkcheck: sphinx-build -W -b linkcheck ./docs/ ./docs/_build/linkcheck/ -install: +all: $(error Take a look at https://vdirsyncer.readthedocs.org/en/stable/tutorial.html#installation) release: python setup.py sdist bdist_wheel upload -.DEFAULT_GOAL := install .PHONY: docs diff --git a/tests/storage/dav/servers/radicale/install.sh b/tests/storage/dav/servers/radicale/install.sh index def6aee..99624ae 100644 --- a/tests/storage/dav/servers/radicale/install.sh +++ b/tests/storage/dav/servers/radicale/install.sh @@ -1,7 +1,10 @@ #!/bin/sh set -e -[ -n "$REQUIREMENTS" ] || export REQUIREMENTS=release -[ -n "$RADICALE_BACKEND" ] || export RADICALE_BACKEND=filesystem + +if [ -z "$RADICALE_BACKEND" ]; then + echo "Missing RADICALE_BACKEND" + false +fi if [ "$REQUIREMENTS" = "release" ]; then radicale_pkg="radicale"