-
Notifications
You must be signed in to change notification settings - Fork 70
/
tox.ini
71 lines (63 loc) · 1.84 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
[tox]
minversion = 1.6
envlist = pep8,py36,py37,docs
skip_missing_interpreters = True
skipsdist = True
[testenv]
usedevelop = True
install_command = pip install -U {opts} {packages}
setenv =
VIRTUAL_ENV={envdir}
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands-zvmsdk = coverage run -m unittest discover -v -s {toxinidir}/zvmsdk/tests/unit
commands-smt = coverage run -m unittest discover -v -s {toxinidir}/smtLayer/tests/unit
[testenv:pep8]
deps = flake8
commands = flake8
flake8 {toxinidir}/scripts/sdkserver
[flake8]
max-line-length = 120
ignore = E121,E122,E123,E124,E125,E126,E127,E128,E129,E131,E251,H405,W504,W605
exclude = .venv,.git,.tox,dist,doc,*openstack/common*,sample,*lib/python*,*egg,build,tools,*.py.*.py
[testenv:docs]
allowlist_externals = rm
commands =
rm -rf doc/build
python3 tools/generate_conf.py
python3 tools/generate_errcode_csv.py
rm -fr doc/source/zvmsdk.conf.sample
rm -fr doc/source/errcode.csv
/bin/mv ./zvmsdk.conf.sample doc/source/zvmsdk.conf.sample
/bin/mv ./errcode.csv doc/source/errcode.csv
sphinx-build -W -b html -d doc/build/doctrees doc/source doc/build/html
[testenv:py{36,37}]
allowlist_externals =
rm
coverage
mkdir
commands =
rm -f /tmp/sdk_guest.sqlite
rm -f /tmp/sdk_image.sqlite
rm -f /tmp/sdk_fcp.sqlite
rm -f /tmp/sdk_network.sqlite
rm -rf /tmp/FakeID
rm -rf test-results
rm -rf /tmp/zvmsdk_ut_logs
{[testenv]commands-smt}
{[testenv]commands-zvmsdk}
mkdir test-results
coverage html -d test-results/cover
[testenv:py{36,37}-zvmsdk]
allowlist_externals = rm
commands =
rm -f /tmp/sdk_guest.sqlite
rm -f /tmp/sdk_image.sqlite
rm -f /tmp/sdk_fcp.sqlite
rm -f /tmp/sdk_network.sqlite
rm -rf /tmp/FakeID
rm -rf /tmp/zvmsdk_ut_logs
{[testenv]commands-zvmsdk}
[testenv:py{36,37}-smt]
commands =
{[testenv]commands-smt}