From caceea0dba8a9f41aae26a360fbde9687109aa4b Mon Sep 17 00:00:00 2001 From: Theo Chatzimichos Date: Sun, 8 Sep 2013 14:23:11 +0200 Subject: ignore virtualenv from flake8 --- bin/runtests | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/runtests b/bin/runtests index 1ea3b7a..f77f005 100755 --- a/bin/runtests +++ b/bin/runtests @@ -5,7 +5,7 @@ while getopts sdcf2 arg; do 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" ;; esac done -- cgit v1.2.3-65-gdbad From 595f30050503698960bf5b32650784ef922e329d Mon Sep 17 00:00:00 2001 From: Theo Chatzimichos Date: Sun, 8 Sep 2013 14:23:26 +0200 Subject: Add script to run flake checks without running the tests --- bin/_flake | 3 +++ 1 file changed, 3 insertions(+) create mode 100755 bin/_flake 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 -- cgit v1.2.3-65-gdbad 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 From 4f3f9e4a4ff07affaf662012700e0ca8718998f3 Mon Sep 17 00:00:00 2001 From: Theo Chatzimichos Date: Sun, 8 Sep 2013 15:02:43 +0200 Subject: Add -v support in runtests --- bin/runtests | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/runtests b/bin/runtests index 0825325..8284ddd 100755 --- a/bin/runtests +++ b/bin/runtests @@ -1,15 +1,16 @@ #!/bin/bash -while getopts dcf2 arg; do +while getopts dcf2v: arg; do case ${arg} in d) TDAEMON="tdaemon -t django" ;; c) COVERAGE="coverage" ;; 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" +ARGS="--settings=okupy.tests.settings --traceback ${VERBOSE}" if [[ -n ${TDAEMON} ]]; then [[ -n ${COVERAGE} ]] && COVERAGE="-c" -- cgit v1.2.3-65-gdbad