a b/coverage-report-all.sh
1
#!/bin/sh
2
#
3
# This script calculates global codebase coverage, based on coverage
4
# of individual application packages.
5
#
6
7
DIRS="Allura Forge*"
8
EXCLUDES='*/migrations*,*/ez_setup/*,*allura/command/*'
9
10
for dir in $DIRS; do
11
    if [ ! -f $dir/.coverage ]; then
12
        echo "$dir/.coverage not found - please run ./run_test --with-coverage first"
13
    else
14
        ln -sf $dir/.coverage .coverage.$dir
15
    fi
16
done
17
18
coverage combine
19
coverage report --ignore-errors --include='Allura/*,Forge*' --omit=$EXCLUDES
20
21
if [ "$1" = "--html" ]; then
22
    coverage html --ignore-errors --include='Allura/*,Forge*' --omit=$EXCLUDES -d report.coverage
23
    coverage html --ignore-errors --include='Allura/*' --omit=$EXCLUDES -d Allura.coverage
24
fi