forked from RedHatQE/openshift-virtualization-tests
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtox.ini
More file actions
132 lines (119 loc) · 3.97 KB
/
tox.ini
File metadata and controls
132 lines (119 loc) · 3.97 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
[tox]
envlist=pytest-check-x86, pytest-check-arm64, pytest-check-s390x, 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
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 --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
[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
# 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
# TODO: remove once verify-bugs-are-open-gh is checked and works properly
[testenv:verify-bugs-are-open]
recreate=True
setenv =
PYTHONPATH = {toxinidir}
deps:
python-utility-scripts
commands =
pip install pip --upgrade
pip install tox --upgrade
pyutils-jira --config-file-path jira.cfg --target-versions "vfuture,4.22.0,4.22.z" --verbose
[testenv:verify-bugs-are-open-gh]
recreate=True
passenv =
JIRA_TOKEN
setenv =
PYTHONPATH = {toxinidir}
deps =
python-utility-scripts
commands =
pyutils-jira --url https://issues.redhat.com --target-versions "vfuture,4.22.0,4.22.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!')"