kmmbvnr / django-jenkins

Plug and play continuous integration with django and jenkins
GNU Lesser General Public License v3.0
945 stars 279 forks source link

Coverage report isn't generated when the test fails #338

Closed lucasgm-bt closed 8 years ago

lucasgm-bt commented 8 years ago

When I run the following command and the unit tests fails, the coverage, flake8 and pylint reports are not generated (only junit.xml is generated). If the tests pass, all reports are generated.

python3 manage.py jenkins --enable-coverage --settings=settings.test

If I manually run the tool (e.g. coverage), the reports are generated, regardless of the test result

coverage run --source='.' manage.py jenkins --settings=settings.test
coverage xml -o reports/coverage.xml

I'm using django-jenkins 0.18.1, Django 1.9.7 and my settings looks like:

...

INSTALLED_APPS += [ 'django_jenkins' ]

JENKINS_TASKS = (
   'django_jenkins.tasks.run_pylint',
   'django_jenkins.tasks.run_flake8'
)

...

Is it a bug?

kmmbvnr commented 8 years ago

That's correct. If unit tests failed the total build considered failed anyway