summaryrefslogtreecommitdiff
path: root/run_tests.sh
diff options
context:
space:
mode:
authorkali <kali@leap.se>2013-01-30 06:52:59 +0900
committerkali <kali@leap.se>2013-01-30 06:52:59 +0900
commit570f84756b3d1f689a172a3ff0c55abf6a60b9dd (patch)
tree0f262acacf35743664c6408edbafe6ba6f119d14 /run_tests.sh
parente60abdcb796ad9e2c44e9b37d3a68e7f159c035c (diff)
parent10a2303fe2d21999bce56940daecb78576f5b741 (diff)
Merge branch 'pre-release-0.2.0' into release-0.2.0
This merge contains today's state of develop branch, minus soledad and email components.
Diffstat (limited to 'run_tests.sh')
-rwxr-xr-xrun_tests.sh15
1 files changed, 12 insertions, 3 deletions
diff --git a/run_tests.sh b/run_tests.sh
index 6505dd54..7cbed018 100755
--- a/run_tests.sh
+++ b/run_tests.sh
@@ -15,6 +15,7 @@ function usage {
echo " -P, --no-pep8 Don't run pep8"
echo " -c, --coverage Generate coverage report"
echo " -h, --help Print this usage message"
+ echo " -A, --all Run all tests, without excluding any"
echo " --hide-elapsed Don't print the elapsed time for each test along with slow test list"
echo ""
echo "Note: with no options specified, the script will try to run the tests in a virtual environment,"
@@ -33,6 +34,7 @@ function process_option {
-p|--pep8) just_pep8=1;;
-P|--no-pep8) no_pep8=1;;
-c|--coverage) coverage=1;;
+ -A|--all) alltests=1;;
-*) noseopts="$noseopts $1";;
*) noseargs="$noseargs $1"
esac
@@ -51,6 +53,7 @@ wrapper=""
just_pep8=0
no_pep8=0
coverage=0
+alltests=0
for arg in "$@"; do
process_option $arg
@@ -65,6 +68,11 @@ if [ $no_site_packages -eq 1 ]; then
installvenvopts="--no-site-packages"
fi
+# If alltests flag is not set, let's exclude some dirs that are troublesome.
+if [ $alltests -eq 0 ]; then
+ noseopts="$noseopts --exclude-dir=src/leap/soledad"
+fi
+
function run_tests {
# Just run the test suites in current environment
${wrapper} $NOSETESTS
@@ -132,9 +140,10 @@ if [ -z "$noseargs" ]; then
fi
function run_coverage {
- # XXX not working? getting 3rd party modules
- coverage_opts="--include `pwd`/src/leap/*,`pwd`/src/leap/eip/*"
- ${wrapper} coverage html -d docs/covhtml -i $coverage_opts
+ 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"
}