summaryrefslogtreecommitdiffstats
path: root/wintest
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-12-01 16:34:16 +1100
committerAndrew Tridgell <tridge@samba.org>2010-12-01 17:00:47 +1100
commit00ecbdbbd13ba191400c6f4185df2dd8e72d1459 (patch)
tree6728ed03fce3c317fe58d2986b1e8644c9e0780c /wintest
parent06fd5b70037728800cfeb2d1989ad8e851f604df (diff)
downloadsamba-00ecbdbbd13ba191400c6f4185df2dd8e72d1459.tar.gz
samba-00ecbdbbd13ba191400c6f4185df2dd8e72d1459.tar.xz
samba-00ecbdbbd13ba191400c6f4185df2dd8e72d1459.zip
wintest: cope with w2k3 form of dcdiag output
Diffstat (limited to 'wintest')
-rwxr-xr-xwintest/test-s4-howto.py2
-rw-r--r--wintest/wintest.py8
2 files changed, 6 insertions, 4 deletions
diff --git a/wintest/test-s4-howto.py b/wintest/test-s4-howto.py
index 28505ffe4ae..840901b3790 100755
--- a/wintest/test-s4-howto.py
+++ b/wintest/test-s4-howto.py
@@ -692,7 +692,6 @@ def run_dcpromo_as_first_dc(t, vm, func_level=None):
t.setwinvars(vm)
t.info("Configuring a windows VM ${WIN_VM} at the first DC in the domain using dcpromo")
child = t.open_telnet("${WIN_HOSTNAME}", "administrator", "${WIN_PASS}", set_time=True)
- child.sendline("dcdiag");
if t.get_is_dc(child):
return
@@ -704,7 +703,6 @@ def run_dcpromo_as_first_dc(t, vm, func_level=None):
t.setvar("FUNCTION_LEVEL_INT", str(0))
child = t.open_telnet("${WIN_HOSTNAME}", "administrator", "${WIN_PASS}", set_ip=True)
- child.sendline("dcdiag");
"""This server must therefore not yet be a directory server, so we must promote it"""
child.sendline("copy /Y con answers.txt")
diff --git a/wintest/wintest.py b/wintest/wintest.py
index 4ba4b4dc9a7..b8e6ea2dd19 100644
--- a/wintest/wintest.py
+++ b/wintest/wintest.py
@@ -343,11 +343,15 @@ class wintest():
child.expect("C:")
def get_is_dc(self, child):
+ '''check if a windows machine is a domain controller'''
child.sendline("dcdiag")
- i = child.expect(["is not a Directory Server", "is not recognized as an internal or external command", "Home Server = "])
+ i = child.expect(["is not a Directory Server",
+ "is not recognized as an internal or external command",
+ "Home Server = ",
+ "passed test Replications"])
if i == 0:
return False
- if i == 1:
+ if i == 1 or i == 3:
child.expect("C:")
child.sendline("net config Workstation")
child.expect("Workstation domain")