Django 1.6 detection for test wrapper script.

This commit is contained in:
Evan Culver 2013-12-18 11:21:09 -08:00
parent 3e769546e4
commit cdf4c8bd93
1 changed files with 14 additions and 1 deletions

15
test.sh
View File

@ -1,5 +1,18 @@
#!/bin/bash
python manage.py test provider oauth2 --traceback --failfast
DJ_VERSION=$(django-admin.py --version)
# exit if fail
[[ "$?" -ne "0" ]] && exit;
IS_16=$(echo $DJ_VERSION | grep "1.6")
# if django version it's not 1.6 and so we pass different
# app names to test runner
if [ "$IS_16" = "1.6" ]; then
app_names=( provider provider.oauth2 )
else
app_names=( provider oauth2 )
fi
python manage.py test ${app_names[@]} --traceback --failfast