summaryrefslogtreecommitdiff
path: root/host/mex/test
diff options
context:
space:
mode:
authorNicolas Schodet2008-04-04 13:03:24 +0200
committerNicolas Schodet2008-04-04 13:03:24 +0200
commita196211836efb555aede4fce4d161e7d327ca719 (patch)
tree472cdf4eeec6596719a49f91111261a6457f40f4 /host/mex/test
parent7724570ce164859bd7f7fd8ff16b9e7fab17eb58 (diff)
* host/mex:
- added support for asynchronous operations.
Diffstat (limited to 'host/mex/test')
-rw-r--r--host/mex/test/test.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/host/mex/test/test.py b/host/mex/test/test.py
index 48484486..bdb705a2 100644
--- a/host/mex/test/test.py
+++ b/host/mex/test/test.py
@@ -5,6 +5,7 @@ from mex.hub import Hub
from mex.node import Node
from mex.msg import Msg
from mex.forked import Forked
+import select
def log (x):
print x
@@ -37,7 +38,11 @@ def c2 ():
r = n.request (m)
assert r.mtype == 0x82
assert r.pop ('B') == (43,)
- n.wait (42)
+ n.wait_async (42)
+ while not n.sync ():
+ fds = select.select ((n, ), (), ())[0]
+ for i in fds:
+ i.read ()
n.wait ()
f2 = Forked (c2)