diff options
author | Mike Gilbert <floppym@gentoo.org> | 2013-05-30 21:16:59 +0000 |
---|---|---|
committer | Mike Gilbert <floppym@gentoo.org> | 2013-05-30 21:16:59 +0000 |
commit | 83fc2df78d282bde8a9b4672afe1295d15116c11 (patch) | |
tree | 19747ddde67058bc98826ba56ef3fc4f31b28cd8 /dev-python/django-tastypie | |
parent | Dont forget to bump the git version too. (diff) | |
download | gentoo-2-83fc2df78d282bde8a9b4672afe1295d15116c11.tar.gz gentoo-2-83fc2df78d282bde8a9b4672afe1295d15116c11.tar.bz2 gentoo-2-83fc2df78d282bde8a9b4672afe1295d15116c11.zip |
Replace python_test with something that actually runs tests. Restrict them until someone gets them working fully.
(Portage version: 2.2.0_alpha177/cvs/Linux x86_64, signed Manifest commit with key 0BBEEA1FEA4843A4)
Diffstat (limited to 'dev-python/django-tastypie')
-rw-r--r-- | dev-python/django-tastypie/ChangeLog | 6 | ||||
-rw-r--r-- | dev-python/django-tastypie/django-tastypie-0.9.15.ebuild | 48 |
2 files changed, 40 insertions, 14 deletions
diff --git a/dev-python/django-tastypie/ChangeLog b/dev-python/django-tastypie/ChangeLog index 4b4c187b6d33..0806f2febbfc 100644 --- a/dev-python/django-tastypie/ChangeLog +++ b/dev-python/django-tastypie/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for dev-python/django-tastypie # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-python/django-tastypie/ChangeLog,v 1.4 2013/05/29 07:56:40 idella4 Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-python/django-tastypie/ChangeLog,v 1.5 2013/05/30 21:16:59 floppym Exp $ + + 30 May 2013; Mike Gilbert <floppym@gentoo.org> django-tastypie-0.9.15.ebuild: + Replace python_test with something that actually runs tests. Restrict them + until someone gets them working fully. *django-tastypie-0.9.15 (29 May 2013) diff --git a/dev-python/django-tastypie/django-tastypie-0.9.15.ebuild b/dev-python/django-tastypie/django-tastypie-0.9.15.ebuild index 65214d04c219..2a8ee077c16f 100644 --- a/dev-python/django-tastypie/django-tastypie-0.9.15.ebuild +++ b/dev-python/django-tastypie/django-tastypie-0.9.15.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-python/django-tastypie/django-tastypie-0.9.15.ebuild,v 1.1 2013/05/29 07:56:40 idella4 Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-python/django-tastypie/django-tastypie-0.9.15.ebuild,v 1.2 2013/05/30 21:16:59 floppym Exp $ EAPI=5 PYTHON_COMPAT=( python{2_6,2_7} ) @@ -9,7 +9,7 @@ inherit distutils-r1 DESCRIPTION="A flexible and capable API layer for django utilising serialisers" HOMEPAGE="http://pypi.python.org/pypi/django-tastypie/ https://github.com/toastdriven/django-tastypie" -SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" +SRC_URI="https://github.com/toastdriven/django-tastypie/archive/v${PV}.tar.gz -> ${P}.tar.gz" KEYWORDS="~amd64 ~x86" IUSE="bip doc digest lxml oauth test yaml" @@ -25,24 +25,46 @@ RDEPEND=">=dev-python/mimeparse-0.1.3[${PYTHON_USEDEP}] oauth? ( dev-python/oauth2[${PYTHON_USEDEP}] dev-python/django-oauth-plus[${PYTHON_USEDEP}] ) lxml? ( dev-python/lxml[${PYTHON_USEDEP}] ) yaml? ( dev-python/pyyaml[${PYTHON_USEDEP}] )" -DEPEND="${RDEPEND} >=dev-python/django-1.2.5[${PYTHON_USEDEP}] +DEPEND="${RDEPEND} dev-python/setuptools[${PYTHON_USEDEP}] - test? ( dev-python/mock[${PYTHON_USEDEP}] )" + test? ( + dev-python/django-oauth-plus[${PYTHON_USEDEP}] + dev-python/oauth2[${PYTHON_USEDEP}] + dev-python/lxml[${PYTHON_USEDEP}] + dev-python/python-digest[${PYTHON_USEDEP}] + dev-python/biplist[${PYTHON_USEDEP}] + dev-python/pyyaml[${PYTHON_USEDEP}] + >=dev-python/mimeparse-0.1.3[${PYTHON_USEDEP}] + >=dev-python/python-dateutil-2.1[${PYTHON_USEDEP}] + dev-python/mock[${PYTHON_USEDEP}] + ) +" + +RESTRICT="test" python_compile_all() { use doc && emake -C docs html } +src_test() { + DISTUTILS_NO_PARALLEL_BUILD=1 distutils-r1_src_test +} + python_test() { - export DJANGO_SETTINGS_MODULE="django.conf" - export SECRET_KEY='green' - if ! "${PYTHON}" -c \ - "from django.conf import global_settings;global_settings.SECRET_KEY='$SECRET_KEY'" \ - -m tastypie.test; then - die "test ${test} failed under ${EPYTHON}" - else - einfo "test ${test} passed under ${EPYTHON}" - fi + # See tests/run_all_tests.sh + local types=( core basic alphanumeric slashless namespaced related + validation gis content_gfk authorization ) + local failed type + + pushd tests > /dev/null || die + for type in "${types[@]}"; do + set -- django-admin.py test ${type} --settings=settings_${type} + echo "$@" + "$@" || failed=1 + done + popd > /dev/null || die + + [[ -z ${failed} ]] || die "Testing failed with ${EPYTHON}" } python_install_all() { |