autotest: allow for wildcard list of steps to be specified

This commit is contained in:
Andrew Tridgell 2012-11-29 18:09:44 +11:00
parent ff9628accf
commit 74f50012a5

View File

@ -176,7 +176,7 @@ signal.alarm(opts.timeout)
def skip_step(step):
'''see if a step should be skipped'''
for skip in skipsteps:
if fnmatch.fnmatch(step, skip):
if fnmatch.fnmatch(step.lower(), skip.lower()):
return True
return False
@ -367,6 +367,15 @@ if lck is None:
atexit.register(util.pexpect_close_all)
if len(args) > 0:
# allow a wildcard list of steps
matched = []
for a in args:
for s in steps:
if fnmatch.fnmatch(s.lower(), a.lower()):
matched.append(s)
steps = matched
try:
if not run_tests(steps):
sys.exit(1)