diff options
author | Andrew Tridgell <tridge@samba.org> | 2010-11-27 11:33:52 +1100 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2010-11-27 02:42:19 +0100 |
commit | 8737baee7c8666b268bff88070ac93164d41470f (patch) | |
tree | b802c304bcfd35e588918e627fa42a3f7ee6e976 /wintest/test-s4-howto.py | |
parent | 353cdd006a467375809eb3c21dc44df7efb9c1d9 (diff) | |
download | samba-8737baee7c8666b268bff88070ac93164d41470f.tar.gz samba-8737baee7c8666b268bff88070ac93164d41470f.tar.bz2 samba-8737baee7c8666b268bff88070ac93164d41470f.zip |
wintest: cope with VMs sometimes not rebooting
my w2k8 image occasionally gets stuck in the early stages of
booting. This adds code to detect a failed reboot, in which case the
VM is reset
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Sat Nov 27 02:42:19 CET 2010 on sn-devel-104
Diffstat (limited to 'wintest/test-s4-howto.py')
-rwxr-xr-x | wintest/test-s4-howto.py | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/wintest/test-s4-howto.py b/wintest/test-s4-howto.py index 3d4b5e0511..ae0dc1437a 100755 --- a/wintest/test-s4-howto.py +++ b/wintest/test-s4-howto.py @@ -261,8 +261,7 @@ def run_winjoin(t, vm): child.expect("The command completed successfully") child.expect("C:") child.sendline("shutdown /r -t 0") - t.port_wait("${WIN_IP}", 139, wait_for_fail=True) - t.port_wait("${WIN_IP}", 139) + t.wait_reboot() child = t.open_telnet("${WIN_HOSTNAME}", "${WIN_USER}", "${WIN_PASS}", set_time=True, set_ip=True) child.sendline("ipconfig /registerdns") child.expect("Registration of the DNS resource records for all adapters of this computer has been initiated. Any errors will be reported in the Event Viewer") @@ -318,8 +317,7 @@ SafeModeAdminPassword=${PASSWORD1} i = child.expect(["You must restart this computer", "failed", "Active Directory Domain Services was not installed", "C:"], timeout=120) if i == 1 or i == 2: raise Exception("dcpromo failed") - t.port_wait("${WIN_IP}", 139, wait_for_fail=True) - t.port_wait("${WIN_IP}", 139) + t.wait_reboot() def test_dcpromo(t, vm): @@ -462,8 +460,7 @@ RebootOnCompletion=No if i != 0: raise Exception("dcpromo failed") child.sendline("shutdown -r -t 0") - t.port_wait("${WIN_IP}", 139, wait_for_fail=True) - t.port_wait("${WIN_IP}", 139) + t.wait_reboot() |