Skip the selected testcase too
[functest-xtesting.git] / tox.ini
1 [tox]
2 envlist = docs,pep8,pylint,yamllint,bashate,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 =
23   doc8 README.rst api --ignore-path api/build
24   sphinx-build -W -b html api/ api/build
25
26 [testenv:pep8]
27 basepython = python2.7
28 commands = flake8
29
30 [testenv:pylint]
31 basepython = python2.7
32 whitelist_externals = bash
33 commands =
34   pylint --disable=locally-disabled --ignore-imports=y --reports=n xtesting
35
36 [testenv:yamllint]
37 basepython = python2.7
38 files =
39   xtesting/ci
40 commands =
41   yamllint -s {[testenv:yamllint]files}
42
43 [testenv:py35]
44 commands = nosetests xtesting/tests/unit
45
46 [testenv:bashate]
47 basepython = python2.7
48 files =
49   build.sh
50 commands = bashate {[testenv:bashate]files}
51
52 [testenv:cover]
53 basepython = python2.7
54 dirs =
55   xtesting/tests/unit/ci
56   xtesting/tests/unit/core
57   xtesting/tests/unit/energy
58   xtesting/tests/unit/utils/test_decorators.py
59 commands = nosetests --with-coverage --cover-tests \
60   --cover-package xtesting.ci.tier_builder \
61   --cover-package xtesting.core \
62   --cover-package xtesting.energy \
63   --cover-package xtesting.tests.unit \
64   --cover-package xtesting.utils.decorators \
65   --cover-min-percentage 100 {[testenv:cover]dirs}
66
67 [testenv:perm]
68 basepython = python2.7
69 whitelist_externals = bash
70 path=. -not -path './.tox/*' -not -path './.git/*' -not -path './doc/reveal.js/*'
71 commands =
72   bash -c "\
73     find {[testenv:perm]path} \( -type f -not -perm 644 -o -type d -not -perm 755 \) \
74     -exec ls -l \{\} + | grep '.' && exit 1 || exit 0"
75   bash -c "\
76     find {[testenv:perm]path} -exec file \{\} + | grep CRLF && exit 1 || exit 0"