~mvo/software-center/trivial-renaming

3020.1.1 by Natalia B. Bidart
- Initial test cleanup:
1
#! /bin/sh
2116 by Michael Vogt
split the coverage generation into its own script
2
3
set -e
4
3020.1.1 by Natalia B. Bidart
- Initial test cleanup:
5
COVERAGE_DIR="./tests/coverage_html"
6
7
# run for a single test if the argument is given
8
if [ $1 ]; then
9
    python-coverage run --parallel $1
10
fi
11
2116 by Michael Vogt
split the coverage generation into its own script
12
# combine the reports
13
python-coverage combine
14
3020.1.1 by Natalia B. Bidart
- Initial test cleanup:
15
if [ -d $COVERAGE_DIR ]; then
16
    rm -rf $COVERAGE_DIR
2116 by Michael Vogt
split the coverage generation into its own script
17
fi
18
19
# generate the coverage data 
20
OMIT="/usr/share/pyshared/*,*piston*,*test_"
3020.1.1 by Natalia B. Bidart
- Initial test cleanup:
21
python-coverage report --omit=$OMIT | tee $COVERAGE_DIR/coverage_summary | tail
2116 by Michael Vogt
split the coverage generation into its own script
22
3020.1.1 by Natalia B. Bidart
- Initial test cleanup:
23
python-coverage html --omit=$OMIT -d $COVERAGE_DIR
24
echo "see $COVERAGE_DIR/index.html for the coverage details"