You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/dev-python/django-tastypie/files/runtests.patch

47 lines
1.6 KiB

The run tests bash script keeps going on a fail. Patch corrects this for gentoo
diff -ur django-tastypie-0.9.15.oirg/tests/run_all_tests.sh django-tastypie-0.9.15/tests/run_all_tests.sh
--- tests/run_all_tests.sh 2013-05-03 10:36:43.000000000 +0800
+++ tests/run_all_tests.sh 2013-06-03 13:55:18.633474126 +0800
@@ -10,9 +10,9 @@
#Don't run customuser tests if django's version is less than 1.5.
if [ $major -lt '2' -a $minor -lt '5' ]; then
- ALL="core basic alphanumeric slashless namespaced related validation gis content_gfk authorization"
+ ALL="core basic alphanumeric slashless namespaced related validation content_gfk authorization"
else
- ALL="core customuser basic alphanumeric slashless namespaced related validation gis content_gfk authorization"
+ ALL="core customuser basic alphanumeric slashless namespaced related validation content_gfk authorization"
fi
@@ -26,15 +26,23 @@
fi
for type in $TYPES; do
- echo "** $type **"
+ echo "** running test $type **"
if [ $type == 'related' ]; then
- django-admin.py test ${type}_resource --settings=settings_$type
- continue
+ if django-admin.py test ${type}_resource --settings=settings_$type; then
+ continue
+ else
+ echo "Test ${type} failed"
+ exit 1
+ fi
elif [ $type == 'gis' ]; then
- createdb -T template_postgis tastypie.db
+ createdb -T template_posttastypie.db
fi
- django-admin.py test $type --settings=settings_$type
- echo; echo
+ if ! django-admin.py test $type --settings=settings_$type; then
+ echo "Test ${type} failed"
+ exit 1
+ else
+ echo; echo
+ fi
done