Merge "1) Cleanup floating IPs that are assigned through Juju Deployment. 2) Add...
[functest.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   -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=stable/queens}
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 api/build \
25     --ignore-path docs/release/release-notes/build \
26     --ignore-path docs/testing/developer/devguide/build \
27     --ignore-path docs/testing/developer/internship/security_group/build \
28     --ignore-path docs/testing/developer/internship/testapi_evolution/build \
29     --ignore-path docs/testing/developer/internship/unit_tests/build \
30     --ignore-path docs/testing/developer/internship/vnf_catalog/build \
31     --ignore-path docs/testing/user/configguide/build \
32     --ignore-path docs/testing/user/userguide/build \
33     api \
34     docs/release/release-notes \
35     docs/testing/user/configguide \
36     docs/testing/user/userguide
37   sphinx-build -W -b html api/ api/build
38   sphinx-build -W -b html docs/release/release-notes docs/release/release-notes/build/html
39   sphinx-build -W -b html docs/testing/developer/devguide docs/testing/developer/devguide/build/html
40   sphinx-build -W -b html docs/testing/developer/internship/security_group docs/testing/developer/internship/security_group/build/html
41   sphinx-build -W -b html docs/testing/developer/internship/testapi_evolution docs/testing/developer/internship/testapi_evolution/build/html
42   sphinx-build -W -b html docs/testing/developer/internship/unit_tests docs/testing/developer/internship/unit_tests/build/html
43   sphinx-build -W -b html docs/testing/developer/internship/vnf_catalog docs/testing/developer/internship/vnf_catalog/build/html
44   sphinx-build -W -b html docs/testing/user/configguide docs/testing/user/configguide/build/html
45   sphinx-build -W -b html docs/testing/user/userguide docs/testing/user/userguide/build/html
46
47 [testenv:pep8]
48 basepython = python2.7
49 commands = flake8
50
51 [testenv:pylint]
52 basepython = python2.7
53 whitelist_externals = bash
54 modules =
55   functest.ci
56   functest.opnfv_tests.openstack.cinder
57   functest.opnfv_tests.openstack.rally
58   functest.opnfv_tests.openstack.refstack
59   functest.opnfv_tests.openstack.snaps
60   functest.opnfv_tests.openstack.tempest
61   functest.opnfv_tests.openstack.vmtp
62   functest.opnfv_tests.openstack.vping
63   functest.opnfv_tests.sdn.odl
64   functest.opnfv_tests.vnf.router
65   functest.tests.unit.ci
66   functest.tests.unit.odl
67   functest.tests.unit.openstack.rally
68   functest.tests.unit.openstack.snaps
69   functest.tests.unit.openstack.tempest
70   functest.tests.unit.openstack.vmtp
71   functest.tests.unit.openstack.vping
72   functest.tests.unit.vnf.router
73   functest.tests.unit.utils
74   functest.utils.config
75   functest.utils.constants
76   functest.utils.env
77   functest.utils.functest_utils
78 commands =
79   bash -c "\
80     pylint -f parseable \
81         --ignore-imports=y \
82         --disable=locally-disabled functest | tee pylint.out"
83   pylint --reports=n --errors-only functest
84   pylint --disable=locally-disabled \
85     --disable=duplicate-code \
86     --ignore-imports=y --reports=n {[testenv:pylint]modules}
87
88 [testenv:yamllint]
89 basepython = python2.7
90 files =
91   .travis.yml
92   docker
93   functest/ci
94   functest/opnfv_tests/vnf
95 commands =
96   yamllint -s {[testenv:yamllint]files}
97
98 [testenv:py35]
99 dirs =
100   functest/tests/unit/ci
101   functest/tests/unit/core
102   functest/tests/unit/odl
103   functest/tests/unit/openstack
104   functest/tests/unit/vnf/epc
105   functest/tests/unit/utils
106 commands = nosetests {[testenv:py35]dirs}
107
108 [testenv:bashate]
109 basepython = python2.7
110 files =
111   functest/opnfv_tests/openstack/cinder/write_data.sh
112   functest/opnfv_tests/openstack/cinder/read_data.sh
113   functest/opnfv_tests/openstack/rally/scenario/support/instance_dd_test.sh
114   functest/ci/download_images.sh
115   build.sh
116 commands = bashate {[testenv:bashate]files}
117
118 [testenv:cover]
119 basepython = python2.7
120 dirs =
121   functest/tests/unit/ci
122   functest/tests/unit/odl
123   functest/tests/unit/openstack/vping
124 commands = nosetests --with-coverage --cover-tests \
125   --cover-package functest.ci.check_deployment \
126   --cover-package functest.opnfv_tests.sdn.odl \
127   --cover-package functest.opnfv_tests.openstack.vping.vping_ssh \
128   --cover-package functest.tests.unit \
129   --cover-min-percentage 100 {[testenv:cover]dirs}
130
131 [testenv:perm]
132 basepython = python2.7
133 whitelist_externals = bash
134 path=. -not -path './.tox/*' -not -path './.git/*' -not -path './docs/com/pres/reveal.js/*'
135 commands =
136   bash -c "\
137     find {[testenv:perm]path} \( -type f -not -perm 644 -o -type d -not -perm 755 \) \
138     -exec ls -l \{\} + | grep '.' && exit 1 || exit 0"
139   bash -c "\
140     find {[testenv:perm]path} -exec file \{\} + | grep CRLF && exit 1 || exit 0"