-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathtox.ini
150 lines (133 loc) · 3.95 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
# Copyright (C) 2019-2024, Nokia
[tox]
envlist = py3{7,8,9,10,11,12}, robottests{3,4,5,6,7}, docs, pylint, flake8, readthedocs, yamllint
requires =
tox < 4
[base]
deps =
mock
pytest
pytest-cov
pytest-flakes
pytest-console-scripts
pyyaml
temp-utils
[testenv]
parallel_show_output = true
setenv =
COVERAGE_FILE = .coverage{envname}
PIP_TIMEOUT = 60
passenv = COVERAGE_FILE
changedir = {envtmpdir}
commands = {posargs:py.test \
--junitxml=junit.xml \
--cov-config {toxinidir}/.coveragerc \
--cov={envsitepackagesdir}/crl/rfcli \
{envsitepackagesdir}/crl/rfcli {toxinidir}/tests}
deps =
{[base]deps}
py37: robotframework < 4
py38: robotframework < 4
py39: robotframework < 5
py310: robotframework < 6
py311: robotframework < 7
py312: robotframework < 8
[pytest]
addopts = --cov-report xml
norecursedirs = bin lib include
[travis]
python =
3.6: py36
3.7: py37, robottests, docs, readthedocs, yamllint
[testenv:pylint]
basepython = python3.12
deps =
pylint
{[base]deps}
commands = pylint {posargs: --reports=n --rcfile={toxinidir}/.pylintrc \
{toxinidir}/src/crl {toxinidir}/tests}
[testenv:flake8]
basepython = python3.12
changedir = {toxinidir}
deps = flake8
commands =
flake8 --max-line-length 120 src tests
[testenv:robottests{3,4,5,6,7}]
changedir = {toxinidir}/robottests
basepython =
robottests3: python3.7
robottests4: python3.10
robottests5: python3.11
robottests6: python3.12
robottests7: python3.12
deps=
robottests3: robotframework < 4
robottests4: robotframework < 5
robottests5: robotframework < 6
robottests6: robotframework < 7
robottests7: robotframework < 8
whitelist_externals=
rm
ln
commands=
rm -rf rfcli_output/{envname}
ln -sTf ../../../extra_libraries testcases/folder1/folder3/link_to_libraries
rfcli --rfcli-output rfcli_output/{envname} \
--target target_file \
-N Run1 -o output1.xml \
--include requires-ini-target testcases
rfcli --rfcli-output rfcli_output/{envname} \
--target {toxinidir}/robottests/targets/target_file \
-N Run2 -o output2.xml \
--include requires-ini-target testcases
rfcli --rfcli-output rfcli_output/{envname} \
--target {toxinidir}/robottests/targets/target_file.yaml \
-N Run3 -o output3.xml \
--include requires-yaml-target testcases
rfcli --rfcli-output rfcli_output/{envname} \
--include requires-ini-target -t targets/target_file.ini \
-N Run4 -o output4.xml \
--variable VAR_FROM_CLI:3 -V variables.py testcases
rfcli --rfcli-output rfcli_output/{envname} \
--include requires-yaml-target -t targets/target_file.yaml \
-N Run5 -o output5.xml \
-v VAR_FROM_CLI:3 --variablefile variables.py testcases
rfcli --rfcli-output rfcli_output/{envname} \
--include test-pythonpath \
-N Run6 -o output6.xml \
testcases
rebot -d rfcli_output/{envname}/ -o output.xml -N robottests \
rfcli_output/{envname}/output1.xml \
rfcli_output/{envname}/output2.xml \
rfcli_output/{envname}/output3.xml \
rfcli_output/{envname}/output4.xml \
rfcli_output/{envname}/output5.xml \
rfcli_output/{envname}/output6.xml
[testenv:docs]
basepython = python3.7
changedir = {toxinidir}
deps =
sphinx
sphinx-argparse
crl.devutils
commands =
crl create_docs --verbose
[testenv:readthedocs]
changedir = {toxinidir}/sphinxdocs
deps =
sphinx
-r sphinxdocs/requirements.txt
commands =
sphinx-build -b html . _build/html
[testenv:yamllint]
changedir = {toxinidir}
deps = yamllint
commands = yamllint -d relaxed .
[testenv:test]
basepython = python3.7
changedir = {toxinidir}
deps = {[testenv:docs]deps}
setenv=
TOX_PARALLEL_NO_SPINNER=1
commands=
crl test --no-virtualenv --toxargs "--parallel auto" {posargs}