Merge "Disable agent testing in tempest-based testcases"
[functest.git] / tox.ini
1 [tox]
2 envlist = docs,pep8,pylint,yamllint,bashate,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=master}
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/build \
27     --ignore-path docs/_build \
28     api \
29     docs
30   sphinx-build -W -b html api/ api/build
31   sphinx-build -W -n -b html docs docs/build/html
32   sphinx-build -W -n -b linkcheck docs docs/_build/linkcheck
33   sphinx-build -W -n -b html -c docs/lfreleng docs docs/_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.ci
44   functest.opnfv_tests.openstack.cinder
45   functest.opnfv_tests.openstack.rally
46   functest.opnfv_tests.openstack.refstack
47   functest.opnfv_tests.openstack.snaps
48   functest.opnfv_tests.openstack.tempest
49   functest.opnfv_tests.openstack.vmtp
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.odl
55   functest.tests.unit.openstack.rally
56   functest.tests.unit.openstack.snaps
57   functest.tests.unit.openstack.tempest
58   functest.tests.unit.openstack.vmtp
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 \
69         --ignore-imports=y \
70         --disable=locally-disabled functest | tee pylint.out"
71   pylint --reports=n --errors-only functest
72   pylint --disable=locally-disabled \
73     --disable=duplicate-code \
74     --ignore-imports=y --reports=n {[testenv:pylint]modules}
75
76 [testenv:yamllint]
77 basepython = python2.7
78 files =
79   .travis.yml
80   ci
81   docker
82   functest/ci
83   functest/opnfv_tests/openstack/rally/rally_jobs.yaml
84   functest/opnfv_tests/openstack/tempest/custom_tests/blacklist.yaml
85   functest/opnfv_tests/openstack/tempest/custom_tests/tempest_conf.yaml
86   functest/opnfv_tests/vnf
87 commands =
88   yamllint -s {[testenv:yamllint]files}
89
90 [testenv:py36]
91 dirs =
92   functest/tests/unit/ci
93   functest/tests/unit/odl
94   functest/tests/unit/openstack
95   functest/tests/unit/vnf/epc
96   functest/tests/unit/utils
97 commands = nosetests {[testenv:py36]dirs}
98
99 [testenv:bashate]
100 basepython = python2.7
101 files =
102   functest/opnfv_tests/openstack/cinder/write_data.sh
103   functest/opnfv_tests/openstack/cinder/read_data.sh
104   functest/ci/add_proxy.sh
105   functest/ci/convert_images.sh
106   functest/ci/download_images.sh
107   build.sh
108 commands = bashate {[testenv:bashate]files}
109
110 [testenv:cover]
111 basepython = python2.7
112 dirs =
113   functest/tests/unit/ci
114   functest/tests/unit/odl
115   functest/tests/unit/openstack/vping
116   functest/tests/unit/openstack/cinder
117 commands = nosetests --with-coverage --cover-tests \
118   --cover-package functest.ci.check_deployment \
119   --cover-package functest.opnfv_tests.sdn.odl \
120   --cover-package functest.opnfv_tests.openstack.vping.vping_ssh \
121   --cover-package functest.opnfv_tests.openstack.cinder.cinder_test \
122   --cover-package functest.tests.unit \
123   --cover-min-percentage 100 {[testenv:cover]dirs}
124
125 [testenv:perm]
126 basepython = python2.7
127 whitelist_externals = bash
128 path=. -not -path './.tox/*' -not -path './.git/*' -not -path './docs/com/pres/reveal.js/*'
129 commands =
130   bash -c "\
131     find {[testenv:perm]path} \( -type f -not -perm 644 -o -type d -not -perm 755 \) \
132     -exec ls -l \{\} + | grep '.' && exit 1 || exit 0"
133   bash -c "\
134     find {[testenv:perm]path} -exec file \{\} + | grep CRLF && exit 1 || exit 0"