diff options
-rw-r--r-- | dev-python/redis-py/redis-py-4.0.2.ebuild | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/dev-python/redis-py/redis-py-4.0.2.ebuild b/dev-python/redis-py/redis-py-4.0.2.ebuild index d43d85672189..892a3038f10e 100644 --- a/dev-python/redis-py/redis-py-4.0.2.ebuild +++ b/dev-python/redis-py/redis-py-4.0.2.ebuild @@ -35,6 +35,10 @@ python_test() { tests/test_pubsub.py::TestPubSubDeadlock::test_pubsub_deadlock ) + epytest -k "not redismod" +} + +src_test() { local redis_pid="${T}"/redis.pid local redis_port=6379 local redis_test_config=" @@ -52,16 +56,8 @@ python_test() { "${EPREFIX}"/usr/sbin/redis-server - <<< "${redis_test_config}" || die # Run the tests - epytest -k "not redismod" + distutils-r1_src_test # Clean up afterwards - local pid=$(<"${redis_pid}") - kill "${pid}" || die - local retries=10 - while [[ -f ${redis_pid} ]]; do - sleep 1 - if [[ $(( retries-- )) -eq 0 ]]; then - die "redis did not stop" - fi - done + kill "$(<"${redis_pid}")" || die } |