Browse Source

Align tox.ini with standards.

Change-Id: Iab112bae0187d025b9b0b6c88208d6706093a184
Monty Taylor 7 years ago
parent
commit
cb8eea4875
3 changed files with 48 additions and 11 deletions
  1. 0
    5
      tools/pip-requires
  2. 10
    0
      tools/test-requires
  3. 38
    6
      tox.ini

+ 0
- 5
tools/pip-requires View File

@@ -1,9 +1,4 @@
1 1
 argparse
2
-coverage
3 2
 httplib2
4
-mock
5
-nose
6 3
 prettytable
7 4
 simplejson
8
-pep8==0.6.1
9
-unittest2

+ 10
- 0
tools/test-requires View File

@@ -0,0 +1,10 @@
1
+distribute>=0.6.24
2
+
3
+mock
4
+nose
5
+nose-exclude
6
+nosexcover
7
+openstack.nose_plugin
8
+pep8>=1.0
9
+sphinx>=1.1.2
10
+unittest2

+ 38
- 6
tox.ini View File

@@ -1,14 +1,46 @@
1 1
 [tox]
2
-envlist = py26,py27
2
+envlist = py26,py27,pep8
3 3
 
4 4
 [testenv]
5
+setenv = VIRTUAL_ENV={envdir}
6
+         NOSE_WITH_OPENSTACK=1
7
+         NOSE_OPENSTACK_COLOR=1
8
+         NOSE_OPENSTACK_RED=0.05
9
+         NOSE_OPENSTACK_YELLOW=0.025
10
+         NOSE_OPENSTACK_SHOW_ELAPSED=1
5 11
 deps = -r{toxinidir}/tools/pip-requires
6
-commands = /bin/bash run_tests.sh -N
12
+       -r{toxinidir}/tools/test-requires
13
+commands = nosetests
7 14
 
8 15
 [testenv:pep8]
9 16
 deps = pep8
10
-commands = /bin/bash run_tests.sh -N --pep8
17
+commands = pep8 --repeat --show-source novaclient setup.py
11 18
 
12
-[testenv:coverage]
13
-deps = coverage
14
-commands = /bin/bash run_tests.sh -N --coverage
19
+[testenv:venv]
20
+commands = {posargs}
21
+
22
+[testenv:cover]
23
+commands = nosetests --cover-erase --cover-package=novaclient --with-xcoverage
24
+
25
+[tox:jenkins]
26
+downloadcache = ~/cache/pip
27
+
28
+[testenv:jenkins26]
29
+basepython = python2.6
30
+setenv = NOSE_WITH_XUNIT=1
31
+deps = file://{toxinidir}/.cache.bundle
32
+
33
+[testenv:jenkins27]
34
+basepython = python2.7
35
+setenv = NOSE_WITH_XUNIT=1
36
+deps = file://{toxinidir}/.cache.bundle
37
+
38
+[testenv:jenkinscover]
39
+deps = file://{toxinidir}/.cache.bundle
40
+setenv = NOSE_WITH_XUNIT=1
41
+commands = nosetests --cover-erase --cover-package=novaclient --with-xcoverage
42
+
43
+[testenv:jenkinsvenv]
44
+deps = file://{toxinidir}/.cache.bundle
45
+setenv = NOSE_WITH_XUNIT=1
46
+commands = {posargs}

Loading…
Cancel
Save