Update all OpenStack refs to opendev.org
[functest.git] / tox.ini
1 [tox]
2 envlist = docs,pep8,pylint,yamllint,ansiblelint,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://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt}
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/build \
26     --ignore-path docs/_build \
27     api \
28     docs
29   sphinx-build -W -b html api/ api/build
30   sphinx-build -W -n -b html docs docs/build/html
31   sphinx-build -W -n -b linkcheck docs docs/_build/linkcheck
32   sphinx-build -W -n -b html -c docs/lfreleng docs docs/_build/html
33
34 [testenv:pep8]
35 basepython = python2.7
36 commands = flake8
37
38 [testenv:pylint]
39 basepython = python2.7
40 whitelist_externals = bash
41 modules =
42   functest.opnfv_tests.openstack.cinder
43   functest.opnfv_tests.openstack.rally
44   functest.opnfv_tests.openstack.refstack
45   functest.opnfv_tests.openstack.tempest
46   functest.opnfv_tests.openstack.vmtp
47   functest.opnfv_tests.openstack.vping
48   functest.opnfv_tests.sdn.odl
49   functest.opnfv_tests.vnf.router
50   functest.tests.unit.odl
51   functest.tests.unit.openstack.rally
52   functest.tests.unit.openstack.tempest
53   functest.tests.unit.openstack.vmtp
54   functest.tests.unit.openstack.vping
55   functest.tests.unit.vnf.router
56   functest.tests.unit.utils
57   functest.utils.config
58   functest.utils.constants
59   functest.utils.env
60   functest.utils.functest_utils
61 commands =
62   bash -c "\
63     pylint -f parseable \
64         --ignore-imports=y \
65         --disable=locally-disabled functest | tee pylint.out"
66   pylint --reports=n --errors-only functest
67   pylint --disable=locally-disabled \
68     --disable=duplicate-code \
69     --ignore-imports=y --reports=n {[testenv:pylint]modules}
70
71 [testenv:yamllint]
72 basepython = python2.7
73 files =
74   .travis.yml
75   docker
76   functest/ci
77   functest/opnfv_tests/openstack/rally/blacklist.yaml
78   functest/opnfv_tests/openstack/rally/rally_jobs.yaml
79   functest/opnfv_tests/openstack/tempest/custom_tests/blacklist.yaml
80   functest/opnfv_tests/openstack/tempest/custom_tests/tempest_conf.yaml
81   functest/opnfv_tests/vnf
82 commands =
83   yamllint -s {[testenv:yamllint]files}
84
85 [testenv:ansiblelint]
86 basepython = python2.7
87 commands =
88   ansible-lint ansible/site.yml
89
90 [testenv:py36]
91 commands = nosetests functest/tests/unit
92
93 [testenv:bashate]
94 basepython = python2.7
95 files =
96   functest/opnfv_tests/openstack/cinder/write_data.sh
97   functest/opnfv_tests/openstack/cinder/read_data.sh
98   functest/ci/add_proxy.sh
99   functest/ci/convert_images.sh
100   functest/ci/download_images.sh
101   build.sh
102 commands = bashate {[testenv:bashate]files}
103
104 [testenv:cover]
105 basepython = python2.7
106 dirs =
107   functest/tests/unit/odl
108   functest/tests/unit/openstack/vping
109   functest/tests/unit/openstack/cinder
110 commands = nosetests --with-coverage --cover-tests \
111   --cover-package functest.opnfv_tests.sdn.odl \
112   --cover-package functest.opnfv_tests.openstack.vping.vping_ssh \
113   --cover-package functest.opnfv_tests.openstack.cinder.cinder_test \
114   --cover-package functest.tests.unit \
115   --cover-min-percentage 100 {[testenv:cover]dirs}
116
117 [testenv:perm]
118 basepython = python2.7
119 whitelist_externals = bash
120 path=. -not -path './.tox/*' -not -path './.git/*' -not -path './docs/com/pres/reveal.js/*'
121 commands =
122   bash -c "\
123     find {[testenv:perm]path} \( -type f -not -perm 644 -o -type d -not -perm 755 \) \
124     -exec ls -l \{\} + | grep '.' && exit 1 || exit 0"
125   bash -c "\
126     find {[testenv:perm]path} -exec file \{\} + | grep CRLF && exit 1 || exit 0"