summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2013-07-08 21:02:03 +0900
committerKali Kaneko <kali@leap.se>2013-07-08 21:02:03 +0900
commitaddf58efe589fa7d85779eb05c3738f23c2e715e (patch)
treedf072f45159c3a4c958870ea2205f4ea6e647ad8
parent84c82e2e70eb92f8871f64b294f055c89c8be331 (diff)
parent6a8a138f9cdcda483d713f6df43de7d660ec8867 (diff)
Merge remote-tracking branch 'chiiph/feature/improve_coverage_report' into develop
-rw-r--r--.coveragerc2
-rwxr-xr-xrun_tests.sh14
2 files changed, 4 insertions, 12 deletions
diff --git a/.coveragerc b/.coveragerc
index bcf38d0f..8ecf46a6 100644
--- a/.coveragerc
+++ b/.coveragerc
@@ -1,6 +1,7 @@
# .coveragerc to control coverage.py
[run]
branch = True
+omit=src/leap/gui/ui_*,src/leap/*/tests/*,src/leap/*/*/tests/*,src/leap/gui/*_rc*,src/leap/_version*
[report]
# Regexes for lines to exclude from consideration
@@ -21,3 +22,4 @@ exclude_lines =
if __name__ == .__main__.:
ignore_errors = True
+omit=src/leap/gui/ui_*,src/leap/*/tests/*,src/leap/*/*/tests/*,src/leap/gui/*_rc*,src/leap/_version* \ No newline at end of file
diff --git a/run_tests.sh b/run_tests.sh
index 500cf53c..9f9262ba 100755
--- a/run_tests.sh
+++ b/run_tests.sh
@@ -64,7 +64,7 @@ done
# If enabled, tell nose to collect coverage data
if [ $coverage -eq 1 ]; then
- noseopts="$noseopts --with-coverage --cover-package=leap"
+ noseopts="$noseopts --with-coverage --cover-package=leap --cover-html --cover-html-dir=docs/covhtml/ --cover-erase"
fi
if [ $no_site_packages -eq 1 ]; then
@@ -153,18 +153,8 @@ if [ -z "$noseargs" ]; then
fi
fi
-function run_coverage {
- cov_opts="--include=`pwd`/src/leap/*" #,`pwd`/src/leap/eip/*"
- cov_opts="$cov_opts --omit=`pwd`/src/leap/gui/ui_*,`pwd`/src/leap/gui/*_rc.py*"
- #cov_opts="--omit=`pwd`/src/leap/base/tests/*,`pwd`/src/leap/eip/tests/*,`pwd`/src/leap/gui/tests/*"
- #cov_opts="$cov_opts,`pwd`/src/leap/util/tests/* "
- #cov_opts="$cov_opts --include=`pwd`/src/leap/*" #,`pwd`/src/leap/eip/*"
- ${wrapper} coverage html -d docs/covhtml -i $cov_opts
- echo "now point your browser at docs/covhtml/index.html"
-}
-
if [ $coverage -eq 1 ]; then
echo "Generating coverage report in docs/covhtml/"
- run_coverage
+ echo "now point your browser at docs/covhtml/index.html"
exit
fi