wintest: Allow Windows VM to have no default route
authorAndrew Bartlett <abartlet@samba.org>
Fri, 17 Feb 2012 00:26:23 +0000 (11:26 +1100)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 17 Feb 2012 06:36:37 +0000 (17:36 +1100)
wintest/wintest.py

index da65732219cb4207f0715602bf3c85828d51580b..2738044e1026b5557fb9e1342725964afdf3e7b3 100644 (file)
@@ -545,9 +545,10 @@ options {
         child.expect('\d+.\d+.\d+.\d+')
         self.setvar('WIN_SUBNET_MASK', child.after)
         child.expect('Default Gateway')
-        child.expect('\d+.\d+.\d+.\d+')
-        self.setvar('WIN_DEFAULT_GATEWAY', child.after)
-        child.expect("C:")
+        i = child.expect(['\d+.\d+.\d+.\d+', "C:"])
+        if i == 0:
+            self.setvar('WIN_DEFAULT_GATEWAY', child.after)
+            child.expect("C:")
 
     def get_is_dc(self, child):
         '''check if a windows machine is a domain controller'''