Add README.rst (pypi)
[functest-xtesting.git] / tox.ini
1 [tox]
2 envlist = docs,pep8,pylint,yamllint,py35,py27,perm,cover
3
4 [testenv]
5 usedevelop = True
6 deps =
7   -c{toxinidir}/upper-constraints.txt
8   -chttps://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=stable/pike
9   -r{toxinidir}/requirements.txt
10   -r{toxinidir}/test-requirements.txt
11 install_command = pip install {opts} {packages}
12 commands = nosetests --with-xunit \
13   --with-coverage \
14   --cover-tests \
15   --cover-package=xtesting \
16   --cover-xml \
17   --cover-html \
18   xtesting/tests/unit
19
20 [testenv:docs]
21 basepython = python2.7
22 commands = sphinx-build -W -b html api/ api/_build
23
24 [testenv:pep8]
25 basepython = python2.7
26 commands = flake8
27
28 [testenv:pylint]
29 basepython = python2.7
30 whitelist_externals = bash
31 commands =
32   pylint --disable=locally-disabled --ignore-imports=y --reports=n xtesting
33
34 [testenv:yamllint]
35 basepython = python2.7
36 files =
37   xtesting/ci
38 commands =
39   yamllint -s {[testenv:yamllint]files}
40
41 [testenv:py35]
42 commands = nosetests xtesting/tests/unit
43
44 [testenv:cover]
45 basepython = python2.7
46 dirs =
47   xtesting/tests/unit/ci
48   xtesting/tests/unit/core
49   xtesting/tests/unit/energy
50   xtesting/tests/unit/utils/test_decorators.py
51 commands = nosetests --with-coverage --cover-tests \
52   --cover-package xtesting.ci.tier_builder \
53   --cover-package xtesting.ci.tier_handler \
54   --cover-package xtesting.core \
55   --cover-package xtesting.energy \
56   --cover-package xtesting.tests.unit \
57   --cover-package xtesting.utils.decorators \
58   --cover-min-percentage 100 {[testenv:cover]dirs}
59
60 [testenv:perm]
61 basepython = python2.7
62 whitelist_externals = bash
63 path=. -not -path './.tox/*' -not -path './.git/*' -not -path './docs/com/pres/reveal.js/*'
64 commands =
65   bash -c "\
66     find {[testenv:perm]path} \( -type f -not -perm 644 -o -type d -not -perm 755 \) \
67     -exec ls -l \{\} + | grep '.' && exit 1 || exit 0"
68   bash -c "\
69     find {[testenv:perm]path} -exec file \{\} + | grep CRLF && exit 1 || exit 0"