mirror of
https://github.com/samsonjs/vdirsyncer.git
synced 2026-04-12 11:55:53 +00:00
Argh, Travis
This commit is contained in:
parent
bce581df37
commit
f7690ad96a
6 changed files with 33 additions and 25 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -5,3 +5,4 @@ htmlcov
|
|||
build
|
||||
env
|
||||
owncloud-testserver
|
||||
*.egg-info
|
||||
|
|
|
|||
13
.travis.yml
13
.travis.yml
|
|
@ -1,11 +1,14 @@
|
|||
language: python
|
||||
python: "2.7"
|
||||
env:
|
||||
- DAV_SERVER=radicale RADICALE_STORAGE=filesystem
|
||||
- DAV_SERVER=radicale RADICALE_STORAGE=database
|
||||
- DAV_SERVER=radicale_git RADICALE_STORAGE=filesystem
|
||||
- DAV_SERVER=radicale_git RADICALE_STORAGE=database
|
||||
- DAV_SERVER=owncloud
|
||||
global:
|
||||
- IS_TRAVIS=true
|
||||
matrix:
|
||||
- DAV_SERVER=radicale_filesystem REQUIREMENTS=release
|
||||
- DAV_SERVER=radicale_filesystem REQUIREMENTS=devel
|
||||
- DAV_SERVER=radicale_database REQUIREMENTS=release
|
||||
- DAV_SERVER=radicale_database REQUIREMENTS=devel
|
||||
- DAV_SERVER=owncloud REQUIREMENTS=release
|
||||
|
||||
install: "./install-deps.sh"
|
||||
script: "./run-tests.sh tests/"
|
||||
|
|
|
|||
|
|
@ -1,28 +1,30 @@
|
|||
#!/bin/sh
|
||||
pip install --use-mirrors .
|
||||
echo "The shell is $SHELL"
|
||||
set -e
|
||||
pip install --use-mirrors --editable .
|
||||
pip install --use-mirrors -r requirements.txt
|
||||
[[ -z "$DAV_SERVER" ]] && DAV_SERVER=radicale
|
||||
[[ -z "$RADICALE_STORAGE" ]] && RADICALE_STORAGE=filesystem
|
||||
[ -n "$DAV_SERVER" ] || DAV_SERVER=radicale_filesystem
|
||||
|
||||
davserver_radicale() {
|
||||
pip install --use-mirrors radicale
|
||||
davserver_radicale_filesystem() {
|
||||
radicale_deps
|
||||
}
|
||||
|
||||
davserver_radicale_git() {
|
||||
pip install git+https://github.com/Kozea/Radicale.git
|
||||
davserver_radicale_database() {
|
||||
radicale_deps
|
||||
pip install --use-mirrors sqlalchemy pysqlite
|
||||
}
|
||||
|
||||
radicale_deps() {
|
||||
pip install --use-mirrors werkzeug
|
||||
radicale_storage_$RADICALE_STORAGE
|
||||
if [ "$REQUIREMENTS" == "release" ]; then
|
||||
radicale_pkg="radicale"
|
||||
elif [ "$REQUIREMENTS" == "devel" ]; then
|
||||
radicale_pkg="git+https://github.com/Kozea/Radicale.git"
|
||||
else
|
||||
false
|
||||
fi
|
||||
pip install --use-mirrors werkzeug $radicale_pkg
|
||||
}
|
||||
|
||||
radicale_storage_database() { pip install --use-mirrors sqlalchemy pysqlite; }
|
||||
radicale_storage_filesystem() { true; }
|
||||
|
||||
|
||||
davserver_owncloud() {
|
||||
git clone https://github.com/untitaker/owncloud-testserver.git
|
||||
cd ./owncloud-testserver/
|
||||
|
|
|
|||
10
run-tests.sh
Normal file → Executable file
10
run-tests.sh
Normal file → Executable file
|
|
@ -1,12 +1,12 @@
|
|||
#!/bin/sh
|
||||
[[ -z "$DAV_SERVER" ]] && DAV_SERVER=radicale
|
||||
[[ -z "$RADICALE_STORAGE" ]] && RADICALE_STORAGE=filesystem
|
||||
set -e
|
||||
[ -n "$DAV_SERVER" ] || DAV_SERVER=radicale_filesystem
|
||||
|
||||
davserver_radicale() { true; }
|
||||
davserver_radicale_git() { true; }
|
||||
davserver_radicale_database() { true; }
|
||||
davserver_radicale_filesystem() { true; }
|
||||
|
||||
davserver_owncloud() {
|
||||
sh ./owncloud-testserver/php.sh
|
||||
sh ./owncloud-testserver/php.sh > /dev/null
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ import requests.exceptions
|
|||
|
||||
|
||||
dav_server = os.environ.get('DAV_SERVER', '').strip() or 'radicale'
|
||||
if dav_server in ('radicale', 'radicale_git'):
|
||||
if dav_server.startswith('radicale_'):
|
||||
from ._radicale import ServerMixin
|
||||
elif dav_server == 'owncloud':
|
||||
from ._owncloud import ServerMixin
|
||||
|
|
|
|||
|
|
@ -57,6 +57,8 @@ create table property (
|
|||
primary key (name, collection_path));
|
||||
'''
|
||||
|
||||
dav_server = os.environ.get('DAV_SERVER', 'radicale_filesystem')
|
||||
|
||||
|
||||
def do_the_radicale_dance(tmpdir):
|
||||
# All of radicale is already global state, the cleanliness of the code and
|
||||
|
|
@ -75,7 +77,7 @@ def do_the_radicale_dance(tmpdir):
|
|||
# Now we can set some basic configuration.
|
||||
radicale.config.set('rights', 'type', 'None')
|
||||
|
||||
if os.environ.get('RADICALE_STORAGE', 'filesystem') == 'filesystem':
|
||||
if dav_server == 'radicale_filesystem':
|
||||
radicale.config.set('storage', 'type', 'filesystem')
|
||||
radicale.config.set('storage', 'filesystem_folder', tmpdir)
|
||||
else:
|
||||
|
|
|
|||
Loading…
Reference in a new issue