Ubuntu Pastebin

Paste from daniel at Fri, 5 Jun 2015 18:47:02 +0000

Download as text
 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
commit b780ce39c07f9a201198c84f281b043751b4b8ca
Author: Daniel Watkins <daniel.watkins@canonical.com>
Date:   Fri Jun 5 11:44:19 2015 +0100

    Add tox targets for coverage testing.
    
    These will require a minimum of 90% coverage to pass.
    
    Change-Id: Ifa311965c0329ce406cfb9e44660240574dacb4a

diff --git a/test-requirements.txt b/test-requirements.txt
index 8dedde5..c5d1265 100644
--- a/test-requirements.txt
+++ b/test-requirements.txt
@@ -12,3 +12,4 @@ oslosphinx
 
 # For style checking
 hacking<0.11,>=0.10.0
+coverage
diff --git a/tox.ini b/tox.ini
index 72fd108..68a53c4 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,7 +1,7 @@
 [tox]
 minversion = 1.6
 skipsdist = True
-envlist = py27, py34, docs, pep8
+envlist = py27, py34, docs, pep8, coverage-{py27,py34}
 
 [tox:jenkins]
 downloadcache = ~/cache/pip
@@ -15,6 +15,15 @@ deps = -r{toxinidir}/test-requirements.txt
     -r{toxinidir}/requirements.txt
 commands = nosetests {posargs}
 
+[coverage]
+commands = nosetests --with-coverage --cover-erase --cover-package=cloudinit --cover-min-percentage=90 --cover-inclusive --cover-html
+
+[testenv:py27-coverage]
+commands = {[coverage]commands} {posargs}
+
+[testenv:py34-coverage]
+commands = {[coverage]commands} {posargs}
+
 [testenv:pep8]
 deps = {[testenv]deps}
 commands = flake8 {posargs}
Download as text