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