Fix Functest User Guide
[functest.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=functest \
16   --cover-xml \
17   --cover-html \
18   functest/tests/unit
19
20 [testenv:docs]
21 basepython = python2.7
22 commands =
23   doc8 \
24     --ignore-path docs/release/release-notes/build \
25     --ignore-path docs/testing/user/configguide/build \
26     --ignore-path docs/testing/user/userguide/build \
27     docs/release/release-notes \
28     docs/testing/user/configguide \
29     docs/testing/user/userguide
30   sphinx-build -W -b html api/ api/_build
31   sphinx-build -W -b html docs/release/release-notes docs/release/release-notes/build/html
32   sphinx-build -W -b html docs/testing/user/configguide docs/testing/user/configguide/build/html
33   sphinx-build -W -b html docs/testing/user/userguide docs/testing/user/userguide/build/html
34
35 [testenv:pep8]
36 basepython = python2.7
37 commands = flake8
38
39 [testenv:pylint]
40 basepython = python2.7
41 whitelist_externals = bash
42 modules =
43   functest.api
44   functest.ci
45   functest.cli
46   functest.opnfv_tests.openstack.rally
47   functest.opnfv_tests.openstack.refstack
48   functest.opnfv_tests.openstack.snaps
49   functest.opnfv_tests.openstack.tempest
50   functest.opnfv_tests.openstack.vping
51   functest.opnfv_tests.sdn.odl
52   functest.opnfv_tests.vnf.router
53   functest.tests.unit.ci
54   functest.tests.unit.cli
55   functest.tests.unit.odl
56   functest.tests.unit.openstack.rally
57   functest.tests.unit.openstack.snaps
58   functest.tests.unit.openstack.tempest
59   functest.tests.unit.openstack.vping
60   functest.tests.unit.vnf.router
61   functest.tests.unit.utils
62   functest.utils.config
63   functest.utils.constants
64   functest.utils.env
65   functest.utils.functest_utils
66 commands =
67   bash -c "\
68     pylint -f parseable --ignore-imports=y --disable=locally-disabled functest | \
69     tee pylint.out | sed -ne '/Raw metrics/,//p'"
70   pylint --reports=n --errors-only functest
71   pylint --disable=locally-disabled \
72     --disable=duplicate-code \
73     --ignore-imports=y --reports=n {[testenv:pylint]modules}
74
75 [testenv:yamllint]
76 basepython = python2.7
77 files =
78   docker
79   functest/api
80   functest/ci
81   functest/opnfv_tests/vnf
82 commands =
83   yamllint -s {[testenv:yamllint]files}
84
85 [testenv:py35]
86 dirs =
87   functest/tests/unit/ci
88   functest/tests/unit/cli
89   functest/tests/unit/odl
90   functest/tests/unit/utils
91 commands = nosetests {[testenv:py35]dirs}
92
93 [testenv:cover]
94 basepython = python2.7
95 dirs =
96   functest/tests/unit/ci
97   functest/tests/unit/odl
98 commands = nosetests --with-coverage --cover-tests \
99   --cover-package functest.ci.check_deployment \
100   --cover-package functest.opnfv_tests.sdn.odl \
101   --cover-package functest.tests.unit \
102   --cover-min-percentage 100 {[testenv:cover]dirs}
103
104 [testenv:perm]
105 basepython = python2.7
106 whitelist_externals = bash
107 path=. -not -path './.tox/*' -not -path './.git/*' -not -path './docs/com/pres/reveal.js/*'
108 commands =
109   bash -c "\
110     find {[testenv:perm]path} \( -type f -not -perm 644 -o -type d -not -perm 755 \) \
111     -exec ls -l \{\} + | grep '.' && exit 1 || exit 0"
112   bash -c "\
113     find {[testenv:perm]path} -exec file \{\} + | grep CRLF && exit 1 || exit 0"