Adding first patch for behave feature
[functest-xtesting.git] / tox.ini
1 [tox]
2 envlist = docs,pep8,pylint,yamllint,ansiblelint,bashate,py27,perm,cover
3 skipsdist = True
4
5 [testenv]
6 usedevelop = True
7 deps =
8   -c{toxinidir}/upper-constraints.txt
9   -chttps://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt
10   -r{toxinidir}/requirements.txt
11   -r{toxinidir}/test-requirements.txt
12 install_command = pip install {opts} {packages}
13 commands = nosetests --with-xunit \
14   --with-coverage \
15   --cover-tests \
16   --cover-package=xtesting \
17   --cover-xml \
18   --cover-html \
19   xtesting/tests/unit
20
21 [testenv:docs]
22 basepython = python2.7
23 commands =
24   doc8 README.rst api --ignore-path api/build
25   sphinx-build -W -b html api/ api/build
26
27 [testenv:pep8]
28 basepython = python2.7
29 commands = flake8
30
31 [testenv:pylint]
32 basepython = python2.7
33 whitelist_externals = bash
34 commands =
35   pylint --min-similarity-lines=10 \
36     --disable=locally-disabled --ignore-imports=y --reports=n xtesting
37
38 [testenv:yamllint]
39 basepython = python2.7
40 files =
41   .travis.yml
42   ansible
43   xtesting/ci
44 commands =
45   yamllint -s {[testenv:yamllint]files}
46
47 [testenv:ansiblelint]
48 basepython = python2.7
49 commands =
50   ansible-lint ansible/site.yml
51
52 [testenv:py36]
53 commands = nosetests xtesting/tests/unit
54
55 [testenv:bashate]
56 basepython = python2.7
57 files =
58   build.sh
59 commands = bashate {[testenv:bashate]files}
60
61 [testenv:bandit]
62 basepython = python2.7
63 commands = bandit -r xtesting -x tests -n 5 -ll -s B602
64
65 [testenv:cover]
66 basepython = python2.7
67 dirs =
68   xtesting/tests/unit/ci
69   xtesting/tests/unit/core
70   xtesting/tests/unit/utils/test_decorators.py
71 commands = nosetests --with-coverage --cover-tests \
72   --cover-package xtesting.core \
73   --cover-package xtesting.tests.unit \
74   --cover-package xtesting.utils.decorators \
75   --cover-min-percentage 100 {[testenv:cover]dirs}
76
77 [testenv:perm]
78 basepython = python2.7
79 whitelist_externals = bash
80 path=. -not -path './.tox/*' -not -path './.git/*' -not -path './doc/reveal.js/*'
81 commands =
82   bash -c "\
83     find {[testenv:perm]path} \( -type f -not -perm 644 -o -type d -not -perm 755 \) \
84     -exec ls -l \{\} + | grep '.' && exit 1 || exit 0"
85   bash -c "\
86     find {[testenv:perm]path} -exec file \{\} + | grep CRLF && exit 1 || exit 0"