This repository has been archived by the owner on Feb 20, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
tox.ini
62 lines (55 loc) · 1.85 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
[tox]
envlist = base
skipsdist = True
[testenv]
sitepackages = False
basepython = python2.7
# install basic dependencies for work application without run tests
[testenv:base]
sitepackages = False
envdir = {toxworkdir}
deps = -rrequirements.txt
# install basic dependencies for work application and tests without run tests
[testenv:basetest]
sitepackages = False
envdir = {toxworkdir}
deps = selenium==3.8.0
mock==1.0.1
flake8==2.6.2
coverage==4.0.3
git+https://github.com/2gis/vmmaster-client
git+https://github.com/2gis/lode_runner
{[testenv:base]deps}
# run unit tests (with install dependencies)
[testenv:unit]
sitepackages = False
envdir = {toxworkdir}
recreate = False
deps = {[testenv:basetest]deps}
commands = {envbindir}/lode_runner -vs --with-xunit --xunit-file=report_unit.xml tests/unit/
# run functional tests (with install dependencies)
[testenv:func]
sitepackages = False
envdir = {toxworkdir}
recreate = False
deps = gunicorn
{[testenv:basetest]deps}
commands = {envbindir}/lode_runner -vs --with-xunit --xunit-file=report_func.xml --processes=4 tests/functional/functional_tests.py
# run integrational tests (with install dependencies)
[testenv:int]
sitepackages = False
passenv = DATABASE
USE_OPENSTACK
OPENSTACK_MAX_VM_COUNT
OPENSTACK_PLATFORM_NAME_PREFIX
envdir = {toxworkdir}
recreate = False
deps = {[testenv:basetest]deps}
commands = {envbindir}/lode_runner -vs --with-xunit --xunit-file=report_int.xml tests/integrational/
# run unit tests with coverage, after run `coverage html`
[testenv:unit-with-coverage]
sitepackages = False
envdir = {toxworkdir}
recreate = False
deps = {[testenv:unit]deps}
commands = {envbindir}/lode_runner -vs --with-xunit --xunit-file=report_unit.xml --cover-package=vmmaster,vmpool,core --with-coverage --cover-erase --cover-html tests/unit/