diff options
author | 2013-09-09 06:11:00 -0700 | |
---|---|---|
committer | 2013-09-09 06:11:00 -0700 | |
commit | edbf6a96998ec81225cd319cd38cb31a7e7fa7ac (patch) | |
tree | 9afc1acf0301ed2859e451aff789e6def61b2285 | |
parent | Merge pull request #86 from dastergon/misc_flake8 (diff) | |
parent | Add -v support in runtests (diff) | |
download | identity.gentoo.org-edbf6a96998ec81225cd319cd38cb31a7e7fa7ac.tar.gz identity.gentoo.org-edbf6a96998ec81225cd319cd38cb31a7e7fa7ac.tar.bz2 identity.gentoo.org-edbf6a96998ec81225cd319cd38cb31a7e7fa7ac.zip |
Merge pull request #87 from tampakrap/bin
Various fixes in runtests
-rwxr-xr-x | bin/_flake | 3 | ||||
-rwxr-xr-x | bin/runtests | 14 |
2 files changed, 11 insertions, 6 deletions
diff --git a/bin/_flake b/bin/_flake new file mode 100755 index 0000000..bb5bf3f --- /dev/null +++ b/bin/_flake @@ -0,0 +1,3 @@ +#!/bin/bash + +flake8 . --exclude=./okupy/tests/settings.py,./okupy/settings,setup.py,.virtualenv diff --git a/bin/runtests b/bin/runtests index 1ea3b7a..8284ddd 100755 --- a/bin/runtests +++ b/bin/runtests @@ -1,23 +1,25 @@ #!/bin/bash -while getopts sdcf2 arg; do +while getopts dcf2v: 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" ;; + f) FLAKE8="flake8 . --exclude=./okupy/tests/settings.py,./okupy/settings,setup.py,.virtualenv" ;; 2) SUFFIX="2" ;; + v) VERBOSE="-v ${OPTARG}" ;; esac done +ARGS="--settings=okupy.tests.settings --traceback ${VERBOSE}" + 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 |