summaryrefslogtreecommitdiff
path: root/wintest
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2013-10-30 10:21:00 +1300
committerStefan Metzmacher <metze@samba.org>2014-03-14 14:51:20 +0100
commitd78369789afa178b4fc64dec3e32f72cb2eb0483 (patch)
treea5f6c92da2931aaa1460ea3ab96d94caa1d118bd /wintest
parent7db0defdd2f7ed39bda6c1ebc2110b83b82f1adc (diff)
downloadsamba-d78369789afa178b4fc64dec3e32f72cb2eb0483.tar.gz
wintest: Try harder to make wintest force the telnet server to start
We try and force the server to start, and we try to force the TelnetClients group to exist Change-Id: I192f0aaaf283b77065ecc671ca2b59a69781d744 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-on: https://gerrit.samba.org/36 Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Fri Mar 14 14:51:20 CET 2014 on sn-devel-104
Diffstat (limited to 'wintest')
-rw-r--r--wintest/wintest.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/wintest/wintest.py b/wintest/wintest.py
index 61664ae87d8..3493df4e457 100644
--- a/wintest/wintest.py
+++ b/wintest/wintest.py
@@ -679,6 +679,7 @@ options {
set_route = False
set_dns = False
set_telnetclients = True
+ start_telnet = True
if self.getvar('WIN_IP'):
ip = self.getvar('WIN_IP')
else:
@@ -711,6 +712,7 @@ options {
pexpect.EOF])
if i == 1:
if set_telnetclients:
+ self.run_cmd('bin/net rpc group add TelnetClients -S $WIN_IP -U$WIN_USER%$WIN_PASS')
self.run_cmd('bin/net rpc group addmem TelnetClients "authenticated users" -S $WIN_IP -U$WIN_USER%$WIN_PASS')
child.close()
retries -= 1
@@ -720,6 +722,15 @@ options {
else:
raise RuntimeError("Failed to connect with telnet due to missing TelnetClients membership")
+ if i == 6:
+ # This only works if it is installed and enabled, but not started. Not entirely likely, but possible
+ self.run_cmd('bin/net rpc service start TlntSvr -S $WIN_IP -U$WIN_USER%$WIN_PASS')
+ child.close()
+ start_telnet = False
+ retries -= 1
+ self.info("retrying (retries=%u delay=%u)" % (retries, delay))
+ continue
+
if i != 0:
child.close()
time.sleep(delay)