Django 1.6 detection for test wrapper script.
This commit is contained in:
parent
3e769546e4
commit
cdf4c8bd93
15
test.sh
15
test.sh
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue