Repository navigation
Expand file tree
/
Copy pathtox.ini
More file actions
153 lines (138 loc) · 5.47 KB
/
Copy pathtox.ini
File metadata and controls
153 lines (138 loc) · 5.47 KB
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
[tox]
minversion = 4.0.0
ignore_basepython_conflict = true
envlist = py310,py313,pep8
[testenv]
extras = {env:RALLY_EXTRAS:}
setenv = LANG=en_US.UTF-8
LANGUAGE=en_US:en
LC_ALL=en_US.UTF-8
PYTHONHASHSEED=0
allowlist_externals = find
rm
make
deps =
-c ./upper-constraints.txt
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
usedevelop = True
commands =
find . -type f -name "*.pyc" -delete
python3 {toxinidir}/tests/ci/pytest_launcher.py tests/unit --posargs={posargs}
distribute = false
basepython = python3
passenv =
REQUESTS_CA_BUNDLE
REPORTS_ROOT
PYTEST_REPORT
[testenv:zuul-ansible-lint]
skip_install = true
distribute = false
setenv = ANSIBLE_LIBRARY = {toxinidir}/tests/ci/ansible-lint-stubs
deps = ansible-lint
commands = ansible-lint --strict --config-file tests/ci/playbooks/.ansible-lint tests/ci/playbooks
[testenv:pep8]
deps = -r{toxinidir}/test-requirements.txt
skip_install = true
commands =
flake8
ruff check {posargs}
[testenv:ruff]
deps = -r{toxinidir}/test-requirements.txt
skip_install = true
commands = ruff check {posargs}
[testenv:mypy]
skip_install = true
deps = {[testenv]deps}
-r{toxinidir}/types-requirements.txt
commands = mypy {posargs:"rally_openstack"}
[testenv:venv]
basepython = python3
commands = {posargs}
[testenv:debug]
commands = oslo_debug_helper -t tests {posargs}
[testenv:functional]
basepython = python3
sitepackages = True
commands =
find . -type f -name "*.pyc" -delete
{toxinidir}/tests/ci/rally_functional_job.sh {posargs}
allowlist_externals = find
rm
make
{toxinidir}/tests/ci/rally_functional_job.sh
[testenv:cover]
commands = {toxinidir}/tests/ci/cover.sh {posargs}
allowlist_externals = {toxinidir}/tests/ci/cover.sh
[testenv:genconfig]
basepython = python3
commands =
oslo-config-generator --config-file etc/rally/rally-config-generator.conf
[testenv:requirements]
# hardcode min-supported version here so we build uc file that is more luckily
# suits every supported python release.
basepython = python3.10
skip_install = true
deps =
# do not use upper-constraints file
requests[security]
-r{toxinidir}/requirements.txt
commands = python3 {toxinidir}/tests/ci/sync_requirements.py {posargs}
[flake8]
# flake8 owns hacking (H-checks + the Rally-specific N3xx checks below) plus the
# pycodestyle continuation-line-indent family (E12x/E131), which ruff does not
# implement. Everything else (E/W/F, import ordering, quotes, builtins,
# naming, ...) is handled by ruff -- see pyproject.toml.
# H105 - Don't use author tags
# H301/H306 - import placement/ordering, delegated to ruff isort (I)
# E121/E123/E126 - off by default in pycodestyle; keep them off
select = H,N3,E12,E131
extend-ignore = H105,H301,H306,E121,E123,E126
show-source = true
exclude=.venv,.git,.tox,dist,*lib/python*,*egg,tools,build,setup.py
[flake8:local-plugins]
extension =
N301 = checks:check_assert_methods_from_mock
N312 = checks:no_use_conf_debug_check
N313 = checks:check_log_warn
N342 = checks:check_opts_import_path
N352 = checks:check_dict_formatting_in_string
N354 = checks:check_raises
paths = ./tests/hacking
[testenv:bindep]
# Do not install any requirements. We want this to be fast and work even if
# system dependencies are missing, since it's used to tell you what system
# dependencies are missing! This also means that bindep must be installed
# separately, outside of the requirements files.
deps = bindep
commands = bindep
[pytest]
filterwarnings =
error
# we do not use anything inner from OptionParser, so we do not care about it's parent
ignore:The frontend.Option.* class will be.*:DeprecationWarning:
# should be fixed at rally framework (raised by functional job)
ignore:.*unclosed file <_io.TextIOWrapper name='/tmp/rally.log'::
ignore:.*distutils Version classes are deprecated.*::
# pytest-cov
ignore:The --rsyncdir command line argument and rsyncdirs config variable are deprecated.:DeprecationWarning:
ignore:::.*requests.*
# python 3.11
ignore:'cgi' is deprecated and slated for removal in Python 3.13:DeprecationWarning:
ignore:datetime\.datetime\.utcnow\(\) is deprecated.*:DeprecationWarning:
ignore:datetime\.datetime\.utcfromtimestamp\(\) is deprecated.*:DeprecationWarning:
# python 3.10
ignore:The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives:DeprecationWarning:
# python 3.12
ignore:Attribute s is deprecated and will be removed in Python 3.14; use value instead:DeprecationWarning:
ignore:eventletutils module is deprecated and will be removed\.:DeprecationWarning:
# openstacksdk imports its own deprecated version module while importing
# the package, so whichever test imports openstacksdk first would fail
ignore:The openstack\.version module is deprecated\..*:DeprecationWarning:
# openstacksdk deprecated the _compute_attributes hook but still calls it
# from Resource.__init__, so it fires for every resource it builds itself
ignore:The _compute_attributes method is deprecated for removal:
# openstacksdk deprecated the service_type argument of Proxy._extract_name
# but Proxy.request keeps passing it while building the cache key, so it
# fires for the first request the SDK sends to any given url
ignore:The 'service_type' parameter is unnecesary and will be removed in a future release\.: