Add tox.ini file
* Factor out `commands` for most environments using {envname} substitution to
build pytest commande.
* Positional arguments are passed on to `pytest` (others may also be passed
after a `--`).
* Set PATH env variable for tests requiring PostgreSQL.
* Also added a `doc` target to build the book.
Also update .hgignore exclude .tox directory (where virtualenvs will be
created and cubicweb.egg-info created by sdist command).
Closes #5447161.
--- a/.hgignore Mon Jun 29 22:34:58 2015 +0200
+++ b/.hgignore Tue Jun 30 23:17:45 2015 +0200
@@ -1,6 +1,8 @@
\.svn
^build$
^dist$
+\.egg-info$
+^.tox$
\.pyc$
\.pyo$
\.bak$
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tox.ini Tue Jun 30 23:17:45 2015 +0200
@@ -0,0 +1,52 @@
+[tox]
+env = py27
+
+[testenv]
+sitepackages = True
+setenv =
+ PATH=/usr/lib/postgresql/9.4/bin:$PATH
+commands = pytest -t {envname}/test {posargs}
+
+[testenv:cubicweb]
+deps =
+ -r{toxinidir}/test/requirements.txt
+commands = pytest -t test {posargs}
+
+[testenv:dataimport]
+
+[testenv:devtools]
+deps =
+ -r{toxinidir}/devtools/test/requirements.txt
+
+[testenv:entities]
+deps =
+ -r{toxinidir}/entities/test/requirements.txt
+
+[testenv:etwist]
+deps =
+ -r{toxinidir}/etwist/test/requirements.txt
+
+[testenv:ext]
+deps =
+ -r{toxinidir}/ext/test/requirements.txt
+
+[testenv:hooks]
+
+[testenv:server]
+deps =
+ -r{toxinidir}/server/test/requirements.txt
+
+[testenv:sobjects]
+deps =
+ -r{toxinidir}/sobjects/test/requirements.txt
+
+[testenv:web]
+deps =
+ -r{toxinidir}/web/test/requirements.txt
+
+[testenv:wsgi]
+
+[testenv:doc]
+changedir = doc/book/en
+deps = sphinx
+commands = make html