[pypy-commit] pypy arm-backend-2: extend timeout for ARM
bivab
noreply at buildbot.pypy.org
Thu Jun 21 11:49:48 CEST 2012
Author: David Schneider <david.schneider at picle.org>
Branch: arm-backend-2
Changeset: r55744:11b7eed8df05
Date: 2012-06-20 15:15 +0000
http://bitbucket.org/pypy/pypy/changeset/11b7eed8df05/
Log: extend timeout for ARM
diff --git a/pypy/module/select/test/test_epoll.py b/pypy/module/select/test/test_epoll.py
--- a/pypy/module/select/test/test_epoll.py
+++ b/pypy/module/select/test/test_epoll.py
@@ -3,8 +3,12 @@
from pypy.conftest import gettestobjspace
+# add a larger timeout for slow ARM machines
+import platform
class AppTestEpoll(object):
+
+
def setup_class(cls):
# NB. we should ideally py.test.skip() if running on an old linux
# where the kernel doesn't support epoll()
@@ -14,6 +18,10 @@
def setup_method(self, meth):
self.w_sockets = self.space.wrap([])
+ if platform.machine().startswith('arm'):
+ self.w_timeout = self.space.wrap(0.06)
+ else:
+ self.w_timeout = self.space.wrap(0.02)
def teardown_method(self, meth):
for socket in self.space.unpackiterable(self.w_sockets):
@@ -132,7 +140,7 @@
expected.sort()
assert events == expected
- assert then - now < 0.02
+ assert then - now < self.timeout
now = time.time()
events = ep.poll(timeout=2.1, maxevents=4)
@@ -145,7 +153,7 @@
now = time.time()
events = ep.poll(1, 4)
then = time.time()
- assert then - now < 0.02
+ assert then - now < self.timeout
events.sort()
expected = [
@@ -162,7 +170,7 @@
now = time.time()
events = ep.poll(1, 4)
then = time.time()
- assert then - now < 0.02
+ assert then - now < self.timeout
expected = [(server.fileno(), select.EPOLLOUT)]
assert events == expected
@@ -186,7 +194,7 @@
now = time.time()
ep.poll(1, 4)
then = time.time()
- assert then - now < 0.02
+ assert then - now < self.timeout
server.close()
ep.unregister(fd)
More information about the pypy-commit
mailing list