forked from InfraSIM/infrasim-compute
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
75 lines (67 loc) · 2.29 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
[tox]
minversion = 2.0
envlist = py27,pep8,unittest,functional,test-infrasim
skipsdist = True
[testenv]
# If 'usedevelop' is True, the current will not be installed,
# tox just created a link in virtualenv pointed to current code
usedevelop = True
setenv =
VIRTUAL_ENV={envdir}
LANGUAGE=en_US
LC_ALL=en_US.utf-8
PYTHONPATH={toxinidir}
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands =
find . -type f -name "*.pyc" -delete
whitelist_externals = bash
sh
find
rm
env
sudo
socat
qemu-img
qemu-system-x86_64
ipmi_sim
install_command = pip install -U --force-reinstall {opts} {packages}
passenv = HOME
TEST_IMAGE_PATH
SKIP_INIT
SKIP_TESTS
STRESS_TIME
INFRASIM_HOME
[testenv:pep8]
basepython = python2.7
setenv = {[testenv]setenv}
ignore_errors=True
commands =
rm -f {toxinidir}/.pep8-log.txt
flake8 test infrasim --output-file={toxinidir}/.pep8-log.txt
flake8_junit {toxinidir}/.pep8-log.txt {toxinidir}/flake8-report.xml
[testenv:unittest]
setenv = {[testenv]setenv}
commands =
{[testenv]commands}
rm -f {toxinidir}/unit.xml
nosetests -v --with-cov --cov-report xml --with-xunit --xunit-file={toxinidir}/unit.xml --cover-inclusive {envdir} {toxinidir}/test/unit/{posargs}
[testenv:functional]
sitepackages = True
setenv = {[testenv]setenv}
commands =
{[testenv]commands}
rm -f {toxinidir}/functional.xml
nosetests -v --with-cov --cov-report xml --with-xunit --xunit-file={toxinidir}/functional.xml --cover-inclusive {envdir} {toxinidir}/test/functional/{posargs}
[testenv:test-infrasim]
setenv = {[testenv]setenv}
commands =
{[testenv]commands}
rm -rf {toxinidir}/test-infrasim.xml
nosetests -v --with-cov --cov-report xml --with-xunit --xunit-file={toxinidir}/test-infrasim.xml --cover-inclusive {envdir} {toxinidir}/test_infrasim/functional/{posargs}
[flake8]
ignore = E121,E122,E123,E124,E125,E126,E127,E128,E129,E131,E251,H405
exclude = .venv,.git,.tox,dist,doc,*lib/python*,*egg,build,data,template,infrasim/model/__init__.py
max-line-length = 120
jobs = 2
count = True