summaryrefslogtreecommitdiffstats
path: root/tox.ini
diff options
context:
space:
mode:
Diffstat (limited to 'tox.ini')
-rw-r--r--tox.ini80
1 files changed, 80 insertions, 0 deletions
diff --git a/tox.ini b/tox.ini
new file mode 100644
index 000000000..8b0c619c8
--- /dev/null
+++ b/tox.ini
@@ -0,0 +1,80 @@
+# Authors:
+# Christian Heimes <cheimes@redhat.com>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Copyright (C) 2015 Red Hat, Inc.
+# All rights reserved.
+#
+
+[tox]
+envlist = py27,lint,docs
+
+[testenv]
+# force installation of sphinx and lint in virtual env, otherwise
+# the command pick up the `pki` package from the system's site packages.
+install_command = pip install {opts} --force-reinstall --upgrade {packages}
+
+[testenv:py27]
+sitepackages = True
+commands =
+ python2.7 {envbindir}/pkidestroy --help
+ python2.7 {envbindir}/pkispawn --help
+ python2.7 {envbindir}/pki-server --help
+ python2.7 {envbindir}/pki-server-upgrade --help
+ python2.7 {envbindir}/pki-upgrade --help
+
+[testenv:lint]
+basepython = python2.7
+sitepackages = True
+deps =
+ pylint
+commands =
+ pylint \
+ {envsitepackagesdir}/pki \
+ {envbindir}/pkidestroy \
+ {envbindir}/pkispawn \
+ {envbindir}/pki-server \
+ {envbindir}/pki-server-upgrade \
+ {envbindir}/pki-upgrade \
+ {envbindir}/pki \
+ --rcfile={toxinidir}/dogtag.pylintrc \
+ {posargs}
+
+[testenv:pep8]
+basepython = python2.7
+sitepackages = False
+deps =
+ flake8
+ # flake8-import-order
+ pep8-naming
+commands =
+ flake8 {posargs}
+
+[testenv:docs]
+basepython = python2.7
+sitepackages = True
+changedir = base/common/python
+deps =
+ sphinx < 1.3.0
+commands =
+ sphinx-build -v -W -b html -d {envtmpdir}/doctrees . {envtmpdir}/html
+
+[flake8]
+exclude = .tox,*.egg,dist,build,conf.py,tests/*
+include = *.py,pki-upgrade,pkidestroy,pki-server,pki-server-upgrade,pkispawn,pki
+show-source = true
+max-line-length = 99
+application-import-names = pki
+