forked from josch/mmdebstrap
coverage.sh: only run cover if coverage data exists
This is useful if ./coverage.sh is run with CMD=./mmdebstrap and thus gathering coverage data is disabled.
This commit is contained in:
parent
13358fc039
commit
40e25ef653
1 changed files with 11 additions and 9 deletions
18
coverage.sh
18
coverage.sh
|
@ -597,15 +597,17 @@ done
|
||||||
guestfish add-ro shared/cover_db.img : run : mount /dev/sda / : tar-out / - \
|
guestfish add-ro shared/cover_db.img : run : mount /dev/sda / : tar-out / - \
|
||||||
| tar -C shared/cover_db --extract
|
| tar -C shared/cover_db --extract
|
||||||
|
|
||||||
cover -nogcov -report html_basic shared/cover_db
|
if [ -e shared/cover_db/runs ]; then
|
||||||
mkdir -p report
|
cover -nogcov -report html_basic shared/cover_db
|
||||||
for f in common.js coverage.html cover.css css.js mmdebstrap--branch.html mmdebstrap--condition.html mmdebstrap.html mmdebstrap--subroutine.html standardista-table-sorting.js; do
|
mkdir -p report
|
||||||
|
for f in common.js coverage.html cover.css css.js mmdebstrap--branch.html mmdebstrap--condition.html mmdebstrap.html mmdebstrap--subroutine.html standardista-table-sorting.js; do
|
||||||
cp -a shared/cover_db/$f report
|
cp -a shared/cover_db/$f report
|
||||||
done
|
done
|
||||||
cover -delete shared/cover_db
|
cover -delete shared/cover_db
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo open file://$(pwd)/report/coverage.html in a browser
|
echo open file://$(pwd)/report/coverage.html in a browser
|
||||||
echo
|
echo
|
||||||
|
fi
|
||||||
|
|
||||||
rm shared/tar1.txt shared/tar2.txt
|
rm shared/tar1.txt shared/tar2.txt
|
||||||
|
|
Loading…
Reference in a new issue