Fix 'cover' tox job

Our 'cover' tox job does not work with release of 'coverage' package v4.0
It fails on option 'ignore-errors' in config section '[report]'.

So, replace usage of this option with CLI option '--ignore-errors'.

Change-Id: I404e3cb63453b0245ac05b4d3cb5780e5b8b7f9a
Closes-Bug: #1497897
This commit is contained in:
Valeriy Ponomaryov 2015-09-21 15:06:59 +03:00
parent 5704fa6aa3
commit 4778740261
2 changed files with 2 additions and 3 deletions

View File

@ -4,5 +4,4 @@ source = manila
omit = manila/test*,manila/openstack/*
[report]
ignore-errors = True
precision = 2

View File

@ -30,7 +30,7 @@ git checkout HEAD^
baseline_report=$(mktemp -t manila_coverageXXXXXXX)
find . -type f -name "*.pyc" -delete && python setup.py testr --coverage --testr-args="$TESTR_ARGS"
coverage report > $baseline_report
coverage report --ignore-errors > $baseline_report
baseline_missing=$(awk 'END { print $3 }' $baseline_report)
# Checkout back and unstash uncommited changes (if any)
@ -40,7 +40,7 @@ git checkout -
# Generate and save coverage report
current_report=$(mktemp -t manila_coverageXXXXXXX)
find . -type f -name "*.pyc" -delete && python setup.py testr --coverage --testr-args="$TESTR_ARGS"
coverage report > $current_report
coverage report --ignore-errors > $current_report
current_missing=$(awk 'END { print $3 }' $current_report)
# Show coverage details