diff options
author | Theo Chatzimichos <tampakrap@gentoo.org> | 2013-08-09 20:57:06 +0200 |
---|---|---|
committer | Theo Chatzimichos <tampakrap@gentoo.org> | 2013-08-09 20:57:06 +0200 |
commit | 4cec4c92d7f58f7dbde4006ff3cd802316b7c0eb (patch) | |
tree | 1824d18f7b1a6d2e6ca97bbee091a37f001cb842 /bin | |
parent | Merge pull request #37 from mgorny/bugfixes (diff) | |
download | identity.gentoo.org-4cec4c92d7f58f7dbde4006ff3cd802316b7c0eb.tar.gz identity.gentoo.org-4cec4c92d7f58f7dbde4006ff3cd802316b7c0eb.tar.bz2 identity.gentoo.org-4cec4c92d7f58f7dbde4006ff3cd802316b7c0eb.zip |
addition of helper bash scripts for development
Diffstat (limited to 'bin')
-rw-r--r-- | bin/.gitignore | 1 | ||||
-rwxr-xr-x | bin/runtests | 24 | ||||
-rwxr-xr-x | bin/trigger_tdaemon_run | 7 |
3 files changed, 32 insertions, 0 deletions
diff --git a/bin/.gitignore b/bin/.gitignore new file mode 100644 index 0000000..02d1091 --- /dev/null +++ b/bin/.gitignore @@ -0,0 +1 @@ +.daemon_run_dummy diff --git a/bin/runtests b/bin/runtests new file mode 100755 index 0000000..4893ba0 --- /dev/null +++ b/bin/runtests @@ -0,0 +1,24 @@ +#!/bin/bash + +while getopts sa:dc arg; do + case ${arg} in + s) SETTINGS="--settings=okupy.tests.settings" ;; + a) APPS=${OPTARG} ;; + d) TDAEMON="tdaemon -t django" ;; + c) COVERAGE="coverage" ;; + esac +done + +[[ -z ${APPS} ]] && APPS="tests" + +if [[ -n ${TDAEMON} ]]; then + [[ -n ${COVERAGE} ]] && COVERAGE="-c" + ${TDAEMON} ${COVERAGE} --custom-args="${SETTINGS} ${APPS}" +elif [[ -n ${COVERAGE} ]]; then + ${COVERAGE} run manage.py test ${SETTINGS} ${APPS} + ${COVERAGE} report -m +else + COMMAND="python manage.py test ${SETTINGS} ${APPS}" + echo "Executing: $COMMAND" + $COMMAND +fi diff --git a/bin/trigger_tdaemon_run b/bin/trigger_tdaemon_run new file mode 100755 index 0000000..a04d9b6 --- /dev/null +++ b/bin/trigger_tdaemon_run @@ -0,0 +1,7 @@ +#!/bin/bash +DUMMY="bin/.daemon_run_dummy" +if [[ -f $DUMMY ]]; then + rm $DUMMY +else + touch $DUMMY +fi |