Skip to content

Commit

Permalink
run_wml_tests: when a batch of tests fails, retry the tests that were…
Browse files Browse the repository at this point in the history
… skipped
  • Loading branch information
CelticMinstrel committed Feb 28, 2021
1 parent 8e27414 commit ee14118
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions run_wml_tests
Expand Up @@ -283,10 +283,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")

Expand Down

0 comments on commit ee14118

Please sign in to comment.