Browse Source

autotest: allow for wildcard list of steps to be specified

mission-4.1.18
Andrew Tridgell 12 years ago
parent
commit
74f50012a5
  1. 11
      Tools/autotest/autotest.py

11
Tools/autotest/autotest.py

@ -176,7 +176,7 @@ signal.alarm(opts.timeout) @@ -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: @@ -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)

Loading…
Cancel
Save