Gentoo Archives: gentoo-commits

From: "Ian Delaney (idella4)" <idella4@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-python/django-tastypie/files: runtests.patch
Date: Mon, 03 Jun 2013 07:08:34
Message-Id: 20130603070829.E69B12171E@flycatcher.gentoo.org
1 idella4 13/06/03 07:08:29
2
3 Added: runtests.patch
4 Log:
5 Added needed deps, tarball from pypi substituted with 'proper' one from home site, patch for running testsuite to die on fail (shifts code from ebuild back to run script), test phase reduced to run on 1 line
6
7 (Portage version: 2.1.11.63/cvs/Linux x86_64, signed Manifest commit with key 0xB8072B0D)
8
9 Revision Changes Path
10 1.1 dev-python/django-tastypie/files/runtests.patch
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/django-tastypie/files/runtests.patch?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/django-tastypie/files/runtests.patch?rev=1.1&content-type=text/plain
14
15 Index: runtests.patch
16 ===================================================================
17 The run tests bash script keeps going on a fail. Patch corrects this for gentoo
18 diff -ur django-tastypie-0.9.15.oirg/tests/run_all_tests.sh django-tastypie-0.9.15/tests/run_all_tests.sh
19 --- tests/run_all_tests.sh 2013-05-03 10:36:43.000000000 +0800
20 +++ tests/run_all_tests.sh 2013-06-03 13:55:18.633474126 +0800
21 @@ -10,9 +10,9 @@
22
23 #Don't run customuser tests if django's version is less than 1.5.
24 if [ $major -lt '2' -a $minor -lt '5' ]; then
25 - ALL="core basic alphanumeric slashless namespaced related validation gis content_gfk authorization"
26 + ALL="core basic alphanumeric slashless namespaced related validation content_gfk authorization"
27 else
28 - ALL="core customuser basic alphanumeric slashless namespaced related validation gis content_gfk authorization"
29 + ALL="core customuser basic alphanumeric slashless namespaced related validation content_gfk authorization"
30 fi
31
32
33 @@ -26,15 +26,23 @@
34 fi
35
36 for type in $TYPES; do
37 - echo "** $type **"
38 + echo "** running test $type **"
39
40 if [ $type == 'related' ]; then
41 - django-admin.py test ${type}_resource --settings=settings_$type
42 - continue
43 + if django-admin.py test ${type}_resource --settings=settings_$type; then
44 + continue
45 + else
46 + echo "Test ${type} failed"
47 + exit -1
48 + fi
49 elif [ $type == 'gis' ]; then
50 - createdb -T template_postgis tastypie.db
51 + createdb -T template_posttastypie.db
52 fi
53
54 - django-admin.py test $type --settings=settings_$type
55 - echo; echo
56 + if ! django-admin.py test $type --settings=settings_$type; then
57 + echo "Test ${type} failed"
58 + exit -1
59 + else
60 + echo; echo
61 + fi
62 done