Merge ~powersj/cloud-init:coverage into cloud-init:master

Proposed by Joshua Powers
Status: Merged
Merged at revision: c12f4dd835077e3aa39e9056c25f136ff6a6655b
Proposed branch: ~powersj/cloud-init:coverage
Merge into: cloud-init:master
Diff against target: 35 lines (+5/-0)
3 files modified
.gitignore (+1/-0)
test-requirements.txt (+1/-0)
tox.ini (+3/-0)
Reviewer Review Type Date Requested Status
Scott Moser Needs Information
Review via email: mp+308975@code.launchpad.net

Description of the change

Adds in coverage collections to cloud-init tox-based unit tests.

To post a comment you must log in.
Revision history for this message
Joshua Powers (powersj) wrote :
Revision history for this message
Scott Moser (smoser) wrote :

do we think we need to do coverage on every thing ?
Can we maybe only run it on the py3 tox enviornment? it is somewhat significantly slower than without coverage.

that would seem enough to me.

review: Needs Information
Revision history for this message
Joshua Powers (powersj) wrote :

That last commit broke things so this is not safe to merge right now...

My intent was to replicate what we do for curtin [1] and simplestreams [2], which runs it on both py3 and py2.7. If we want to change to just py3 that is fine as it does save some time. Let me get a working commit.

[1] https://jenkins.ubuntu.com/server/job/curtin-ci/nodes=amd64/270/console
[2] https://jenkins.ubuntu.com/server/job/simplestreams-ci/nodes=amd64/26/console

Revision history for this message
Joshua Powers (powersj) wrote :

There was an error fetching revisions from git servers. Please try again in a few minutes. If the problem persists, contact Launchpad support.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/.gitignore b/.gitignore
index 77eb9c7..865cac1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,3 +4,4 @@ dist
4*.pyc4*.pyc
5__pycache__5__pycache__
6.tox6.tox
7.coverage
diff --git a/test-requirements.txt b/test-requirements.txt
index 6bf3894..0e7fc8f 100644
--- a/test-requirements.txt
+++ b/test-requirements.txt
@@ -3,6 +3,7 @@ httpretty>=0.7.1
3mock3mock
4nose4nose
5unittest25unittest2
6coverage
67
7# Only needed if you want to know the test times8# Only needed if you want to know the test times
8# nose-timer9# nose-timer
diff --git a/tox.ini b/tox.ini
index 277858e..08318a9 100644
--- a/tox.ini
+++ b/tox.ini
@@ -19,6 +19,9 @@ setenv =
1919
20[testenv:py3]20[testenv:py3]
21basepython = python321basepython = python3
22commands = {envpython} -m nose \
23 {posargs:--with-coverage --cover-erase \
24 --cover-branches --cover-package=cloudinit --cover-inclusive}
2225
23[testenv:py26]26[testenv:py26]
24commands = nosetests {posargs:tests}27commands = nosetests {posargs:tests}

Subscribers

People subscribed via source and target branches