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