autotest: list failed tests

This commit is contained in:
Andrew Tridgell 2011-11-09 17:16:20 +11:00
parent 6089e491ed
commit c98c8b5144
1 changed files with 5 additions and 0 deletions

View File

@ -141,6 +141,7 @@ def run_tests(steps):
'''run a list of steps''' '''run a list of steps'''
passed = True passed = True
failed = []
for step in steps: for step in steps:
if skip_step(step): if skip_step(step):
continue continue
@ -150,12 +151,16 @@ def run_tests(steps):
if not run_step(step): if not run_step(step):
print(">>>> FAILED STEP: %s at %s" % (step, time.asctime())) print(">>>> FAILED STEP: %s at %s" % (step, time.asctime()))
passed = False passed = False
failed.append(step)
continue continue
except Exception, msg: except Exception, msg:
passed = False passed = False
failed.append(step)
print(">>>> FAILED STEP: %s at %s (%s)" % (step, time.asctime(), msg)) print(">>>> FAILED STEP: %s at %s (%s)" % (step, time.asctime(), msg))
continue continue
print(">>>> PASSED STEP: %s at %s" % (step, time.asctime())) print(">>>> PASSED STEP: %s at %s" % (step, time.asctime()))
if not passed:
print("FAILED %u tests: %s" % (len(failed), failed))
return passed return passed
try: try: