run_wml_tests: when a batch of tests fails, retry the tests that were skipped

This commit is contained in:
Celtic Minstrel 2021-02-28 04:27:44 -05:00 committed by Celtic Minstrel
parent 9969e1c34a
commit 0e7f19462e

View file

@ -288,10 +288,15 @@ if __name__ == '__main__':
runner = WesnothRunner(options)
for batch in test_list:
try:
runner.run_tests(batch, test_summary)
except UnexpectedTestStatusException as e:
pass
while len(batch) > 0:
last_passed_count = test_summary.passed
try:
runner.run_tests(batch, test_summary)
batch = []
except UnexpectedTestStatusException as e:
just_passed = test_summary.passed - last_passed_count
batch = batch[just_passed + 1 :]
test_summary.skip_test(-len(batch))
print("Result:", test_summary.passed, "of", test_summary.total, "tests passed")