From 5681e7a163960522e3f102a0d8953a89d9c82de2 Mon Sep 17 00:00:00 2001 From: fivethreeo Date: Mon, 6 Dec 2010 15:51:20 +0100 Subject: [PATCH] added --disable-coverage flag --- runtests.sh | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/runtests.sh b/runtests.sh index 15428e83cd7..8d9486bcc3b 100755 --- a/runtests.sh +++ b/runtests.sh @@ -6,6 +6,7 @@ num_args=${#args[@]} index=0 reuse_env=false +disable_coverage=false while [ "$index" -lt "$num_args" ] do @@ -18,14 +19,20 @@ do reuse_env=true ;; + "--disable-coverage") + disable_coverage=true + ;; + "--help") echo "" echo "usage:" echo " runtests.sh" + echo " or runtests.sh [testcase]" echo " or runtests.sh [flags] [testcase]" echo "" echo "flags:" echo " --failfast - abort at first failing test" + echo " --disable-coverage - don't use coverage" echo " --reuse-env - don't run builout, use last built environment" exit 1 ;; @@ -63,11 +70,17 @@ else echo "Running cms test $suite." fi -./bin/coverage run --rcfile=.coveragerc testapp/manage.py test $suite $failfast -retcode=$? -echo "Post test actions..." -./bin/coverage xml -./bin/coverage html +if [ $disable_coverage == false ]; then + ./bin/coverage run --rcfile=.coveragerc testapp/manage.py test $suite $failfast + retcode=$? + + echo "Post test actions..." + ./bin/coverage xml + ./bin/coverage html +else + ./bin/django test $suite $failfast + retcode=$? +fi cd .. echo "done" exit $retcode