From: "Arthur Zamarin" <arthurzam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/django-cacheops/
Date: Mon, 1 Nov 2021 10:09:05 +0000 (UTC) [thread overview]
Message-ID: <1635761335.f8a484a18c7566ad0656531a0efdb8d385471cbb.arthurzam@gentoo> (raw)
commit: f8a484a18c7566ad0656531a0efdb8d385471cbb
Author: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
AuthorDate: Mon Nov 1 09:57:04 2021 +0000
Commit: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Mon Nov 1 10:08:55 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f8a484a1
dev-python/django-cacheops: enable tests
Closes: https://bugs.gentoo.org/797865
Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>
.../django-cacheops/django-cacheops-5.1.ebuild | 41 ++++++++++++++++++++--
1 file changed, 39 insertions(+), 2 deletions(-)
diff --git a/dev-python/django-cacheops/django-cacheops-5.1.ebuild b/dev-python/django-cacheops/django-cacheops-5.1.ebuild
index 2bcc4a8d194..35821ca12dd 100644
--- a/dev-python/django-cacheops/django-cacheops-5.1.ebuild
+++ b/dev-python/django-cacheops/django-cacheops-5.1.ebuild
@@ -13,12 +13,49 @@ SRC_URI="mirror://pypi/${PN:0:1}"/${PN}/${P}.tar.gz
LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64"
+IUSE="test"
+RESTRICT="!test? ( test )"
-DEPEND="
+RDEPEND="
>=dev-python/django-1.8[${PYTHON_USEDEP}]
>=dev-python/redis-py-2.9.1[${PYTHON_USEDEP}]
>=dev-python/funcy-1.8[${PYTHON_USEDEP}]
>=dev-python/six-1.4.0[${PYTHON_USEDEP}]
"
+BDEPEND="
+ test? (
+ ${RDEPEND}
+ dev-db/redis
+ )
+"
+
+src_prepare() {
+ # Remove test dependent on unpackaged before_after
+ sed -e 's/test_lock/_&/' -i tests/test_extras.py || die
+ distutils-r1_src_prepare
+}
+
+python_test() {
+ local -x DJANGO_SETTINGS_MODULE=tests.settings
+ django-admin test -v 2 || die
+}
+
+src_test() {
+ local redis_pid="${T}"/redis.pid
+ local redis_port=6379
+
+ einfo "Spawning Redis"
+ einfo "NOTE: Port ${redis_port} must be free"
+ "${EPREFIX}"/usr/sbin/redis-server - <<-EOF || die
+ daemonize yes
+ pidfile ${redis_pid}
+ port ${redis_port}
+ bind 127.0.0.1
+ EOF
+
+ # Run the tests
+ distutils-r1_src_test
-RDEPEND="${DEPEND}"
+ # Clean up afterwards
+ kill "$(<"${redis_pid}")" || die
+}
next reply other threads:[~2021-11-01 10:09 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-01 10:09 Arthur Zamarin [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-11-01 6:35 [gentoo-commits] repo/gentoo:master commit in: dev-python/django-cacheops/ Michał Górny
2024-07-08 19:22 Michał Górny
2023-11-23 20:35 Arthur Zamarin
2023-10-25 7:43 Michał Górny
2023-07-28 15:58 Michał Górny
2023-07-24 11:31 Michał Górny
2023-05-11 6:34 Michał Górny
2023-04-06 15:38 Michał Górny
2023-03-15 18:34 Arthur Zamarin
2023-02-23 6:19 Michał Górny
2022-06-23 5:19 Sam James
2022-06-16 8:05 Michał Górny
2022-05-28 5:00 Michał Górny
2021-11-14 8:46 Michał Górny
2021-11-01 10:09 Arthur Zamarin
2021-11-01 10:09 Arthur Zamarin
2021-11-01 10:09 Arthur Zamarin
2021-04-25 18:10 William Hubbs
2021-01-30 20:27 Conrad Kostecki
2021-01-30 20:27 Conrad Kostecki
2020-03-26 20:52 Michał Górny
2020-02-11 20:10 William Hubbs
2020-02-05 5:50 Michał Górny
2020-01-26 20:01 William Hubbs
2020-01-25 20:54 Michał Górny
2019-07-15 23:16 William Hubbs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1635761335.f8a484a18c7566ad0656531a0efdb8d385471cbb.arthurzam@gentoo \
--to=arthurzam@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox