forked from gnocchixyz/gnocchi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
114 lines (102 loc) · 3.9 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
[tox]
minversion = 2.4
envlist = py{37,27}-{postgresql,mysql}{,-file,-swift,-ceph,-s3},pep8
skipsdist = True
[testenv]
skip_install = 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,redis
ceph: GNOCCHI_STORAGE_DEPS=ceph
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 =
-e
.[test,redis,prometheus,amqp1,{env:GNOCCHI_STORAGE_DEPS:},{env:GNOCCHI_INDEXER_DEPS:}]
{env:GNOCCHI_TEST_TARBALLS:}
cliff!=2.9.0
commands =
{toxinidir}/run-tests.sh {posargs}
{toxinidir}/run-func-tests.sh {posargs}
[testenv:py37-postgresql-file-upgrade-from-4.3]
# We should always recreate since the script upgrade
# Gnocchi we can't reuse the virtualenv
recreate = True
setenv = GNOCCHI_VARIANT=test,postgresql,file
deps = gnocchi[{env:GNOCCHI_VARIANT}]>=4.3,<4.4
pifpaf[gnocchi]>=0.13
gnocchiclient>=2.8.0
xattr!=0.9.4
commands = pifpaf --env-prefix INDEXER run postgresql {toxinidir}/run-upgrade-tests.sh {posargs}
[testenv:py27-mysql-ceph-upgrade-from-4.3]
# We should always recreate since the script upgrade
# Gnocchi we can't reuse the virtualenv
recreate = True
setenv = GNOCCHI_VARIANT=test,mysql,ceph,ceph_recommended_lib
deps = gnocchi[{env:GNOCCHI_VARIANT}]>=4.3,<4.4
gnocchiclient>=2.8.0
pifpaf[ceph,gnocchi]>=0.13
xattr!=0.9.4
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
commands = flake8
[testenv:py27-cover]
commands = pifpaf -g GNOCCHI_INDEXER_URL run postgresql -- python setup.py testr --coverage --testr-args="{posargs}"
[flake8]
exclude = .tox,.eggs,doc,gnocchi/rest/prometheus/remote_pb2.py
show-source = true
enable-extensions = H904
[testenv:docs]
basepython = python3
## This does not work, see: https://github.com/tox-dev/tox/issues/509
# deps = {[testenv]deps}
# .[postgresql,doc]
# setenv = GNOCCHI_STORAGE_DEPS=file
deps =
-e
.[test,file,postgresql,doc]
doc8
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
install_command = pip install -U {opts} {packages}
deps = {[testenv:docs]deps}
setuptools
commands =
rm -rf doc/build/html
pifpaf -g GNOCCHI_INDEXER_URL run postgresql -- python setup.py build_sphinx
[doc8]
ignore-path = doc/source/rest.rst,doc/source/comparison-table.rst