From 470be5db75bccb8a42b05798abd5b1000544d216 Mon Sep 17 00:00:00 2001 From: Theo Chatzimichos Date: Sun, 8 Sep 2013 14:58:00 +0200 Subject: Remove the -s arg, since we always need to define the test settings --- bin/runtests | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/bin/runtests b/bin/runtests index f77f005..0825325 100755 --- a/bin/runtests +++ b/bin/runtests @@ -1,8 +1,7 @@ #!/bin/bash -while getopts sdcf2 arg; do +while getopts dcf2 arg; do case ${arg} in - s) SETTINGS="--settings=okupy.tests.settings" ;; d) TDAEMON="tdaemon -t django" ;; c) COVERAGE="coverage" ;; f) FLAKE8="flake8 . --exclude=./okupy/tests/settings.py,./okupy/settings,setup.py,.virtualenv" ;; @@ -10,14 +9,16 @@ while getopts sdcf2 arg; do esac done +ARGS="--settings=okupy.tests.settings --traceback" + if [[ -n ${TDAEMON} ]]; then [[ -n ${COVERAGE} ]] && COVERAGE="-c" - ${TDAEMON} ${COVERAGE} --custom-args="${SETTINGS} ${*:${OPTIND}}" + ${TDAEMON} ${COVERAGE} --custom-args="${ARGS} ${*:${OPTIND}}" elif [[ -n ${COVERAGE} ]]; then - ${COVERAGE} run manage.py test --traceback ${SETTINGS} "${@:${OPTIND}}" + ${COVERAGE} run manage.py test ${ARGS} "${@:${OPTIND}}" ${COVERAGE} report -m else - COMMAND="python${SUFFIX} manage.py test --traceback ${SETTINGS} ${*:${OPTIND}}" + COMMAND="python${SUFFIX} manage.py test ${ARGS} ${*:${OPTIND}}" echo "Executing: $COMMAND" $COMMAND fi -- cgit v1.2.3-65-gdbad