Rename all Functest refs to Xtesting
[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 dirs =
43   xtesting/tests/unit/ci
44   xtesting/tests/unit/core
45   xtesting/tests/unit/energy
46   xtesting/tests/unit/utils
47 commands = nosetests {[testenv:py35]dirs}
48
49 [testenv:cover]
50 basepython = python2.7
51 dirs =
52   xtesting/tests/unit/ci
53   xtesting/tests/unit/core
54   xtesting/tests/unit/energy
55   xtesting/tests/unit/utils/test_decorators.py
56 commands = nosetests --with-coverage --cover-tests \
57   --cover-package xtesting.ci.tier_builder \
58   --cover-package xtesting.ci.tier_handler \
59   --cover-package xtesting.core \
60   --cover-package xtesting.energy \
61   --cover-package xtesting.tests.unit \
62   --cover-package xtesting.utils.decorators \
63   --cover-min-percentage 100 {[testenv:cover]dirs}
64
65 [testenv:perm]
66 basepython = python2.7
67 whitelist_externals = bash
68 path=. -not -path './.tox/*' -not -path './.git/*' -not -path './docs/com/pres/reveal.js/*'
69 commands =
70   bash -c "\
71     find {[testenv:perm]path} \( -type f -not -perm 644 -o -type d -not -perm 755 \) \
72     -exec ls -l \{\} + | grep '.' && exit 1 || exit 0"
73   bash -c "\
74     find {[testenv:perm]path} -exec file \{\} + | grep CRLF && exit 1 || exit 0"