Remove fds in all branches
[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://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   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.ci
43   functest.opnfv_tests.openstack.cinder
44   functest.opnfv_tests.openstack.rally
45   functest.opnfv_tests.openstack.refstack
46   functest.opnfv_tests.openstack.snaps
47   functest.opnfv_tests.openstack.tempest
48   functest.opnfv_tests.openstack.vmtp
49   functest.opnfv_tests.openstack.vping
50   functest.opnfv_tests.sdn.odl
51   functest.opnfv_tests.vnf.router
52   functest.tests.unit.ci
53   functest.tests.unit.odl
54   functest.tests.unit.openstack.rally
55   functest.tests.unit.openstack.snaps
56   functest.tests.unit.openstack.tempest
57   functest.tests.unit.openstack.vmtp
58   functest.tests.unit.openstack.vping
59   functest.tests.unit.vnf.router
60   functest.tests.unit.utils
61   functest.utils.config
62   functest.utils.constants
63   functest.utils.env
64   functest.utils.functest_utils
65 commands =
66   bash -c "\
67     pylint -f parseable \
68         --ignore-imports=y \
69         --disable=locally-disabled functest | tee pylint.out"
70   pylint --reports=n --errors-only functest
71   pylint --disable=locally-disabled \
72     --disable=duplicate-code \
73     --ignore-imports=y --reports=n {[testenv:pylint]modules}
74
75 [testenv:yamllint]
76 basepython = python2.7
77 files =
78   .travis.yml
79   ci
80   docker
81   functest/ci
82   functest/opnfv_tests/openstack/rally/blacklist.yaml
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:ansiblelint]
91 basepython = python2.7
92 commands =
93   ansible-lint ansible/site.yml
94
95 [testenv:py36]
96 dirs =
97   functest/tests/unit/ci
98   functest/tests/unit/odl
99   functest/tests/unit/openstack
100   functest/tests/unit/vnf/epc
101   functest/tests/unit/utils
102 commands = nosetests {[testenv:py36]dirs}
103
104 [testenv:bashate]
105 basepython = python2.7
106 files =
107   functest/opnfv_tests/openstack/cinder/write_data.sh
108   functest/opnfv_tests/openstack/cinder/read_data.sh
109   functest/ci/add_proxy.sh
110   functest/ci/convert_images.sh
111   functest/ci/download_images.sh
112   build.sh
113 commands = bashate {[testenv:bashate]files}
114
115 [testenv:cover]
116 basepython = python2.7
117 dirs =
118   functest/tests/unit/ci
119   functest/tests/unit/odl
120   functest/tests/unit/openstack/vping
121   functest/tests/unit/openstack/cinder
122 commands = nosetests --with-coverage --cover-tests \
123   --cover-package functest.ci.check_deployment \
124   --cover-package functest.opnfv_tests.sdn.odl \
125   --cover-package functest.opnfv_tests.openstack.vping.vping_ssh \
126   --cover-package functest.opnfv_tests.openstack.cinder.cinder_test \
127   --cover-package functest.tests.unit \
128   --cover-min-percentage 100 {[testenv:cover]dirs}
129
130 [testenv:perm]
131 basepython = python2.7
132 whitelist_externals = bash
133 path=. -not -path './.tox/*' -not -path './.git/*' -not -path './docs/com/pres/reveal.js/*'
134 commands =
135   bash -c "\
136     find {[testenv:perm]path} \( -type f -not -perm 644 -o -type d -not -perm 755 \) \
137     -exec ls -l \{\} + | grep '.' && exit 1 || exit 0"
138   bash -c "\
139     find {[testenv:perm]path} -exec file \{\} + | grep CRLF && exit 1 || exit 0"