Page MenuHomeSoftware Heritage

tox: Adapt configuration to make the coverage report work
ClosedPublic

Authored by ardumont on Nov 7 2018, 5:01 PM.

Details

Summary

Discussion:

16:27 <+zack> ardumont: is this 0% coverage a false positive? https://jenkins.softwareheritage.org/view/swh%20master/job/DDEP/job/tests/7/cobertura/
16:27 <+zack> because there are tests in swh-deposit
16:44 <+anlambert> ardumont: got the same tests coverage issue with swh-web, if you adapt your tox.ini in the same way as in https://forge.softwareheritage.org/source/swh-web/browse/master/tox.ini, coverage report will work
16:48 <+ardumont> zack: yes, it's a false positive (i expect a much higher coverage ;)
16:48 <+ardumont> anlambert: thx for the heads up
16:53 <+ardumont> anlambert: zack: indeed, now it says 82% (locally)
16:53 <+ardumont> (through tox)
16:55 <+anlambert> \o/
Test Plan

tox

Diff Detail

Repository
rDDEP Push deposit
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 2257
Build 2715: tox-on-jenkinsJenkins
Build 2714: arc lint + arc unit

Event Timeline

Apart the pifpaf dependency that is not needed, LGTM

tox.ini
8

Your tests can be executed without pifpaf apparently, so I would remove that dependency

11

same here, no need to run pifpaf

This revision is now accepted and ready to land.Nov 7 2018, 5:07 PM
ardumont added inline comments.
tox.ini
8

Well, they seem to work locally without it.
Not sure if the ci will accept that though.
So for now, i'm for keeping those.

Give it a try by updating the diff ;-)

ardumont added inline comments.
tox.ini
11

If i stop the db service and run without pifpaf, this fails (fail to connect to the instance).
If i stop the service and keep pifpaf, it's ok.
So we need those (as i suppose that's more how the ci will run).

Ok, pifpaf is needed after all. I forgot that you are using a django postgres backend for swh-deposit.

This revision was automatically updated to reflect the committed changes.