-
Notifications
You must be signed in to change notification settings - Fork 72
Expand file tree
/
Copy pathtox.ini
More file actions
141 lines (129 loc) · 4.54 KB
/
Copy pathtox.ini
File metadata and controls
141 lines (129 loc) · 4.54 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
[tox]
envlist=pytest-check-x86, pytest-check-arm64, pytest-check-s390x, pytest-check-multiarch, unused-code, utilities-unittests
skipsdist=True
[testenv]
basepython = python3
[testenv:pytest-check-x86]
basepython = python3.14
recreate=True
setenv =
PYTHONPATH = {toxinidir}
LC_ALL = en_US.utf8
LANG = en_US.utf8
UV_PYTHON = python3.14
OPENSHIFT_VIRTUALIZATION_TEST_IMAGES_ARCH = amd64
deps=
uv
allowlist_externals =
sh
commands =
uv run pytest --tc-file=tests/global_config.py --collect-only
uv run pytest --tc-file=tests/global_config.py --upgrade=cnv --cnv-image=NA --cnv-version=NA --collect-only
uv run pytest --tc-file=tests/global_config.py --upgrade=ocp --ocp-image=NA --collect-only
uv run pytest --tc-file=tests/global_config.py --upgrade=eus --cnv-image=NA --cnv-version=NA --eus-ocp-images=NA,NA --collect-only
uv run pytest --tc-file=tests/global_config.py --upgrade_custom=cnv --cnv-image=NA --cnv-version=NA --collect-only
uv run pytest --tc-file=tests/global_config.py --upgrade_custom=ocp --ocp-image=NA --collect-only
uv run pytest --tc-file=tests/global_config_rh_it.py --collect-only
uv run pytest --tc-file=tests/global_config.py -m smoke --collect-only
uv run pytest --tc-file=tests/global_config.py --tc-format=python --setup-plan
# Run pytest on each subdirectory in tests directory
sh -c 'find tests -mindepth 1 -maxdepth 1 -type d | sort | while read d; do uv run pytest --tc-file=tests/global_config.py --collect-only "$d" || exit 1; done'
[testenv:pytest-check-arm64]
basepython = python3.14
recreate=True
setenv =
PYTHONPATH = {toxinidir}
LC_ALL = en_US.utf8
LANG = en_US.utf8
UV_PYTHON = python3.14
OPENSHIFT_VIRTUALIZATION_TEST_IMAGES_ARCH = arm64
deps=
uv
commands =
uv run pytest --tc-file=tests/global_config.py --collect-only -m arm64
[testenv:pytest-check-s390x]
basepython = python3.14
recreate=True
setenv =
PYTHONPATH = {toxinidir}
LC_ALL = en_US.utf8
LANG = en_US.utf8
UV_PYTHON = python3.14
OPENSHIFT_VIRTUALIZATION_TEST_IMAGES_ARCH = s390x
deps=
uv
commands =
uv run pytest --tc-file=tests/global_config.py --collect-only -m s390x
[testenv:pytest-check-multiarch]
basepython = python3.14
recreate=True
setenv =
PYTHONPATH = {toxinidir}
LC_ALL = en_US.utf8
LANG = en_US.utf8
UV_PYTHON = python3.14
OPENSHIFT_VIRTUALIZATION_TEST_IMAGES_ARCH = amd64,arm64
deps=
uv
commands =
uv run pytest --tc-file=tests/global_config.py --cpu-arch=amd64 --collect-only
uv run pytest --tc-file=tests/global_config.py --cpu-arch=arm64 --collect-only
uv run pytest --tc-file=tests/global_config_multiarch.py --cpu-arch=amd64,arm64 -m multiarch --collect-only
# Polarion
# Should run on every commit.
[testenv:verify-tc-requirement-polarion]
recreate=True
setenv =
PYTHONPATH = {toxinidir}
deps:
python-utility-scripts
commands =
pyutils-polarion-verify-tc-requirements --project-id "CNV" --branch "origin/main"
# Should run only after merged.
[testenv:mark-automated-polarion]
recreate=True
setenv =
PYTHONPATH = {toxinidir}
deps:
python-utility-scripts
commands =
pyutils-polarion-set-automated --project-id "CNV" {posargs}
#Jira
[testenv:verify-bugs-are-open-gh]
recreate=True
passenv =
JIRA_TOKEN
JIRA_USER
setenv =
PYTHONPATH = {toxinidir}
deps =
python-utility-scripts
# TODO: Update target-versions when we branch 4.23 and 5.0
commands =
pyutils-jira --cloud --url https://redhat.atlassian.net --target-versions "vfuture,4.23.0,4.23.z,5.0.0,5.0.z" --resolved-statuses "verified,release pending,closed" --issue-pattern "([A-Z]+-[0-9]+)" --version-string-not-targeted-jiras "vfuture" --verbose
#Unused code
[testenv:unused-code]
basepython = python3.14
recreate=True
setenv =
PYTHONPATH = {toxinidir}
deps:
python-utility-scripts
commands =
pyutils-unusedcode --exclude-files "pytest_matrix_utils.py" --exclude-function-prefixes "pytest_"
# Utilities unit tests with coverage verification
[testenv:utilities-unittests]
basepython = python3.14
recreate = True
setenv =
PYTHONPATH = {toxinidir}
LC_ALL = en_US.utf8
LANG = en_US.utf8
UV_PYTHON = python3.14
deps =
uv
commands =
# Run utilities unit tests with coverage (configuration in main pyproject.toml)
uv run --extra utilities-test pytest utilities/unittests/ --cov=utilities --cov-report=term --cov-report=html:utilities/htmlcov --cov-report=xml:utilities/coverage.xml --cov-fail-under=95 -v
# Display final coverage summary
uv run python -c "print('\n✅ All utilities unit tests passed with required coverage threshold!')"