summaryrefslogtreecommitdiff
path: root/tox.ini
diff options
context:
space:
mode:
Diffstat (limited to 'tox.ini')
-rw-r--r--tox.ini107
1 files changed, 107 insertions, 0 deletions
diff --git a/tox.ini b/tox.ini
new file mode 100644
index 00000000..d1e03366
--- /dev/null
+++ b/tox.ini
@@ -0,0 +1,107 @@
+[tox]
+envlist = py27
+skipsdist=True
+
+[testenv]
+basepython = python2.7
+commands =
+ py.test -x \
+ --cov-report=html \
+ --cov-report=term \
+ --cov=leap.soledad \
+ {posargs}
+usedevelop = True
+deps =
+ coverage
+ pytest
+ pytest-cov
+ pytest-twisted
+ mock
+ testscenarios
+ setuptools-trial
+ pdbpp
+ couchdb
+ requests
+ service_identity
+ leap.common
+# used by benchmarks
+ psutil
+ numpy
+ pytest-benchmark
+ elasticsearch
+ certifi
+# install soledad from current tree
+ -e.[client]
+ -e.[server]
+setenv =
+ HOME=/tmp
+ TERM=xterm
+ XDG_CACHE_HOME=./.cache/
+install_command = pip install {opts} {packages}
+
+[testenv:py34]
+basepython = python3.4
+commands =
+ py.test \
+ --cov-report=html \
+ --cov-report=term \
+ --cov=leap.soledad \
+ {posargs}
+usedevelop = True
+deps =
+ coverage
+ pytest
+ pytest-cov
+ pytest-twisted
+ mock
+ testscenarios
+ setuptools-trial
+ couchdb
+ requests
+ service_identity
+# used by benchmarks
+ psutil
+ numpy
+ pytest-benchmark
+ elasticsearch
+ certifi
+# install soledad local packages
+ -e.[client]
+ -e.[server]
+setenv =
+ HOME=/tmp
+ TERM=xterm
+install_command = pip3 install {opts} {packages}
+
+[testenv:benchmark]
+usedevelop = True
+deps =
+ {[testenv]deps}
+commands =
+# run benchmarks twice: once for time and cpu and a second time for memory
+ py.test --subdir=benchmarks {posargs}
+ py.test --subdir=benchmarks --watch-memory {posargs}
+passenv = HOST_HOSTNAME
+
+[testenv:responsiveness]
+usedevelop = True
+deps =
+ {[testenv:benchmark]deps}
+commands =
+ py.test --subdir=responsiveness {posargs}
+
+[testenv:code-check]
+deps =
+ pep8
+ flake8
+commands =
+ pep8
+ flake8
+
+[testenv:parallel]
+deps =
+ {[testenv]deps}
+ pytest-xdist
+install_command = pip install {opts} {packages}
+commands =
+ py.test {posargs} -n 4