summaryrefslogtreecommitdiff
path: root/wintest
diff options
context:
space:
mode:
authorBjörn Baumbach <bb@sernet.de>2012-06-12 19:45:51 +0200
committerKai Blin <kai@samba.org>2012-06-21 21:55:20 +0200
commit884e28f66b01a8bf21f855f91875f22defa121ab (patch)
tree1e09289deb200a0448b2139b3332ea73c00740c9 /wintest
parented3ded11220d16c5ebfefd7e165eeb32e185f452 (diff)
downloadsamba-884e28f66b01a8bf21f855f91875f22defa121ab.tar.gz
samba-884e28f66b01a8bf21f855f91875f22defa121ab.tar.bz2
samba-884e28f66b01a8bf21f855f91875f22defa121ab.zip
wintest: check netcats exitstatus instead of output
There are many netcat implementations with different output messages. Signed-off-by: Kai Blin <kai@samba.org>
Diffstat (limited to 'wintest')
-rw-r--r--wintest/wintest.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/wintest/wintest.py b/wintest/wintest.py
index 94d54de150..93da47a6a6 100644
--- a/wintest/wintest.py
+++ b/wintest/wintest.py
@@ -492,9 +492,12 @@ options {
while retries > 0:
child = self.pexpect_spawn("nc -v -z -w 1 %s %u" % (hostname, port), crlf=False, timeout=1)
- i = child.expect(['succeeded', 'failed', pexpect.EOF, pexpect.TIMEOUT])
+ child.expect([pexpect.EOF, pexpect.TIMEOUT])
+ child.close()
+ i = child.exitstatus
if wait_for_fail:
- if i > 0:
+ #wait for timeout or fail
+ if i == None or i > 0:
return
else:
if i == 0: