summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-12-01 16:07:56 +1100
committerAndrew Tridgell <tridge@samba.org>2010-12-01 06:54:13 +0100
commit9c84f987acb5ffc97a612839e13e8b8042e6120e (patch)
tree008092317c9562340a8c65062240d6363f3a1e9f
parent60e1a2c8cb49b774952b86ae8cdd4a5d6473c3ea (diff)
downloadsamba-9c84f987acb5ffc97a612839e13e8b8042e6120e.tar.gz
samba-9c84f987acb5ffc97a612839e13e8b8042e6120e.tar.bz2
samba-9c84f987acb5ffc97a612839e13e8b8042e6120e.zip
wintest: make command matching case insensitive by default
the new BASEDN changes break the RODC join otherwise Autobuild-User: Andrew Tridgell <tridge@samba.org> Autobuild-Date: Wed Dec 1 06:54:13 CET 2010 on sn-devel-104
-rw-r--r--wintest/wintest.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/wintest/wintest.py b/wintest/wintest.py
index 5f7bd0a8d5..4ba4b4dc9a 100644
--- a/wintest/wintest.py
+++ b/wintest/wintest.py
@@ -177,7 +177,7 @@ class wintest():
return self.run_cmd(cmd, output=True)
def cmd_contains(self, cmd, contains, nomatch=False, ordered=False, regex=False,
- casefold=False):
+ casefold=True):
'''check that command output contains the listed strings'''
if isinstance(contains, str):
@@ -187,6 +187,9 @@ class wintest():
self.info(out)
for c in self.substitute(contains):
if regex:
+ if casefold:
+ c = c.upper()
+ out = out.upper()
m = re.search(c, out)
if m is None:
start = -1
@@ -210,7 +213,7 @@ class wintest():
out = out[end:]
def retry_cmd(self, cmd, contains, retries=30, delay=2, wait_for_fail=False,
- ordered=False, regex=False, casefold=False):
+ ordered=False, regex=False, casefold=True):
'''retry a command a number of times'''
while retries > 0:
try: