forked from gnocchixyz/gnocchi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
161 lines (144 loc) · 5.66 KB
/
tox.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
[tox]
minversion = 2.4
envlist = py{35,27}-{postgresql,mysql}{,-file,-swift,-ceph,-s3},pep8
[testenv]
usedevelop = True
sitepackages = False
passenv = LANG GNOCCHI_TEST_* AWS_*
setenv =
GNOCCHI_TEST_STORAGE_DRIVER=file
GNOCCHI_TEST_INDEXER_DRIVER=postgresql
GNOCCHI_TEST_STORAGE_DRIVERS=file swift ceph s3 redis
GNOCCHI_TEST_INDEXER_DRIVERS=postgresql mysql
file: GNOCCHI_TEST_STORAGE_DRIVERS=file
swift: GNOCCHI_TEST_STORAGE_DRIVERS=swift
ceph: GNOCCHI_TEST_STORAGE_DRIVERS=ceph
redis: GNOCCHI_TEST_STORAGE_DRIVERS=redis
s3: GNOCCHI_TEST_STORAGE_DRIVERS=s3
postgresql: GNOCCHI_TEST_INDEXER_DRIVERS=postgresql
mysql: GNOCCHI_TEST_INDEXER_DRIVERS=mysql
GNOCCHI_STORAGE_DEPS=file,swift,test-swift,s3,ceph,ceph_recommended_lib,redis
ceph: GNOCCHI_STORAGE_DEPS=ceph,ceph_recommended_lib
swift: GNOCCHI_STORAGE_DEPS=swift,test-swift
file: GNOCCHI_STORAGE_DEPS=file
redis: GNOCCHI_STORAGE_DEPS=redis
s3: GNOCCHI_STORAGE_DEPS=s3
GNOCCHI_INDEXER_DEPS=mysql,postgresql
mysql: GNOCCHI_INDEXER_DEPS=mysql
postgresql: GNOCCHI_INDEXER_DEPS=postgresql
# FIXME(sileht): pbr doesn't support url in setup.cfg extras, so we do this crap
GNOCCHI_TEST_TARBALLS=http://tarballs.openstack.org/swift/swift-master.tar.gz#egg=swift
ceph: GNOCCHI_TEST_TARBALLS=
swift: GNOCCHI_TEST_TARBALLS=http://tarballs.openstack.org/swift/swift-master.tar.gz#egg=swift
s3: GNOCCHI_TEST_TARBALLS=
redis: GNOCCHI_TEST_TARBALLS=
file: GNOCCHI_TEST_TARBALLS=
# NOTE(jd) Install redis as a test dependency since it is used as a
# coordination driver in functional tests (--coordination-driver is passed to
# pifpaf)
deps = .[test,redis,{env:GNOCCHI_STORAGE_DEPS:},{env:GNOCCHI_INDEXER_DEPS:}]
{env:GNOCCHI_TEST_TARBALLS:}
commands =
doc8 doc/source
{toxinidir}/run-tests.sh {posargs}
{toxinidir}/run-func-tests.sh {posargs}
[testenv:py35-postgresql-file-upgrade-from-3.1]
# We should always recreate since the script upgrade
# Gnocchi we can't reuse the virtualenv
recreate = True
skip_install = True
usedevelop = False
setenv = GNOCCHI_VARIANT=test,postgresql,file
deps = gnocchi[{env:GNOCCHI_VARIANT}]>=3.1,<3.2
pifpaf[gnocchi]>=0.13
gnocchiclient>=2.8.0
commands = pifpaf --env-prefix INDEXER run postgresql {toxinidir}/run-upgrade-tests.sh {posargs}
[testenv:py27-mysql-ceph-upgrade-from-3.1]
# We should always recreate since the script upgrade
# Gnocchi we can't reuse the virtualenv
recreate = True
skip_install = True
usedevelop = False
setenv = GNOCCHI_VARIANT=test,mysql,ceph,ceph_recommended_lib
deps = gnocchi[{env:GNOCCHI_VARIANT}]>=3.1,<3.2
gnocchiclient>=2.8.0
pifpaf[ceph,gnocchi]>=0.13
commands = pifpaf --env-prefix INDEXER run mysql -- pifpaf --env-prefix STORAGE run ceph {toxinidir}/run-upgrade-tests.sh {posargs}
[testenv:py35-postgresql-file-upgrade-from-4.0]
# We should always recreate since the script upgrade
# Gnocchi we can't reuse the virtualenv
recreate = True
skip_install = True
usedevelop = False
setenv = GNOCCHI_VARIANT=test,postgresql,file
deps = gnocchi[{env:GNOCCHI_VARIANT}]>=4.0,<4.1
pifpaf[gnocchi]>=0.13
gnocchiclient>=2.8.0
commands = pifpaf --env-prefix INDEXER run postgresql {toxinidir}/run-upgrade-tests.sh {posargs}
[testenv:py27-mysql-ceph-upgrade-from-4.0]
# We should always recreate since the script upgrade
# Gnocchi we can't reuse the virtualenv
recreate = True
skip_install = True
usedevelop = False
setenv = GNOCCHI_VARIANT=test,mysql,ceph,ceph_recommended_lib
deps = gnocchi[{env:GNOCCHI_VARIANT}]>=4.0,<4.1
gnocchiclient>=2.8.0
pifpaf[ceph,gnocchi]>=0.13
commands = pifpaf --env-prefix INDEXER run mysql -- pifpaf --env-prefix STORAGE run ceph {toxinidir}/run-upgrade-tests.sh {posargs}
[testenv:pep8]
deps = hacking>=0.12,<0.13
bashate
whitelist_externals = bash
commands = flake8
bashate -v devstack/plugin.sh
[testenv:py27-gate]
setenv = GNOCCHI_TEST_PATH=gnocchi/tests/functional_live
GABBI_LIVE=1
passenv = {[testenv]passenv} GNOCCHI_SERVICE* GNOCCHI_AUTHORIZATION
sitepackages = True
basepython = python2.7
commands = {toxinidir}/tools/pretty_tox.sh '{posargs}'
# This target provides a shortcut to running just the gabbi tests.
[testenv:py27-gabbi]
deps = .[test,postgresql,file]
setenv = GNOCCHI_TEST_PATH=gnocchi/tests/functional
basepython = python2.7
commands = pifpaf -g GNOCCHI_INDEXER_URL run postgresql -- {toxinidir}/tools/pretty_tox.sh '{posargs}'
[testenv:py27-cover]
commands = pifpaf -g GNOCCHI_INDEXER_URL run postgresql -- python setup.py testr --coverage --testr-args="{posargs}"
[testenv:venv]
# This is used by the doc job on the gate
deps = {[testenv:docs]deps}
commands = pifpaf -g GNOCCHI_INDEXER_URL run postgresql -- {posargs}
[flake8]
exclude = .tox,.eggs,doc
show-source = true
enable-extensions = H904
[testenv:docs]
basepython = python2.7
## This does not work, see: https://github.com/tox-dev/tox/issues/509
# deps = {[testenv]deps}
# .[postgresql,doc]
# setenv = GNOCCHI_STORAGE_DEPS=file
deps = .[test,file,postgresql,doc]
setenv = GNOCCHI_TEST_DEBUG=1
commands = doc8 --ignore-path doc/source/rest.rst,doc/source/comparison-table.rst doc/source
pifpaf -g GNOCCHI_INDEXER_URL run postgresql -- python setup.py build_sphinx -W
[testenv:docs-gnocchi.xyz]
basepython = python2.7
whitelist_externals = bash rm
setenv = GNOCCHI_STORAGE_DEPS=file
GNOCCHI_TEST_DEBUG=1
deps = {[testenv:docs]deps}
sphinxcontrib-versioning
# for 3.x doc
oslotest
oslosphinx
retrying
commands =
rm -rf doc/build/html
pifpaf -g GNOCCHI_INDEXER_URL run postgresql -- sphinx-versioning build doc/source doc/build/html
bash tools/validate_docs.sh
[doc8]
ignore-path = doc/source/rest.rst,doc/source/comparison-table.rst