summaryrefslogtreecommitdiff
path: root/run_tests.sh
diff options
context:
space:
mode:
Diffstat (limited to 'run_tests.sh')
-rwxr-xr-xrun_tests.sh23
1 files changed, 7 insertions, 16 deletions
diff --git a/run_tests.sh b/run_tests.sh
index 7cbed018..ebea30b2 100755
--- a/run_tests.sh
+++ b/run_tests.sh
@@ -15,7 +15,6 @@ 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,"
@@ -34,14 +33,13 @@ 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
}
venv=.venv
-with_venv=pkg/tools/with_venv.sh
+with_venv=setup/tools/with_venv.sh
always_venv=0
never_venv=0
force=0
@@ -53,7 +51,6 @@ wrapper=""
just_pep8=0
no_pep8=0
coverage=0
-alltests=0
for arg in "$@"; do
process_option $arg
@@ -68,11 +65,6 @@ 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
@@ -85,7 +77,7 @@ function run_pep8 {
echo "Running pep8 ..."
srcfiles="src/leap tests"
# Just run PEP8 in current environment
- pep8_opts="--ignore=E202,W602 --exclude=*_rc.py,_version.py --repeat"
+ pep8_opts="--ignore=E202,W602 --exclude=*_rc.py --repeat"
${wrapper} pep8 ${pep8_opts} ${srcfiles}
}
@@ -107,14 +99,14 @@ then
else
if [ $always_venv -eq 1 ]; then
# Automatically install the virtualenv
- python pkg/install_venv.py $installvenvopts
+ python setup/install_venv.py $installvenvopts
wrapper="${with_venv}"
else
echo -e "No virtual environment found...create one? (Y/n) \c"
read use_ve
if [ "x$use_ve" = "xY" -o "x$use_ve" = "x" -o "x$use_ve" = "xy" ]; then
# Install the virtualenv and run the test suite in it
- python pkg/install_venv.py $installvenvopts
+ python setup/install_venv.py $installvenvopts
wrapper=${with_venv}
fi
fi
@@ -140,10 +132,9 @@ if [ -z "$noseargs" ]; then
fi
function run_coverage {
- 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
+ # 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
echo "now point your browser at docs/covhtml/index.html"
}