Commit 920a335e authored by Zachary Ware's avatar Zachary Ware

Issue #24751: When running regrtest with '-w', don't fail if re-run succeeds.

parent 1ae28d2f
...@@ -812,7 +812,7 @@ def main(tests=None, **kwargs): ...@@ -812,7 +812,7 @@ def main(tests=None, **kwargs):
if ns.verbose2 and bad: if ns.verbose2 and bad:
print("Re-running failed tests in verbose mode") print("Re-running failed tests in verbose mode")
for test in bad: for test in bad[:]:
print("Re-running test %r in verbose mode" % test) print("Re-running test %r in verbose mode" % test)
sys.stdout.flush() sys.stdout.flush()
try: try:
...@@ -823,8 +823,13 @@ def main(tests=None, **kwargs): ...@@ -823,8 +823,13 @@ def main(tests=None, **kwargs):
# print a newline separate from the ^C # print a newline separate from the ^C
print() print()
break break
except: else:
raise if ok[0] in {PASSED, ENV_CHANGED, SKIPPED, RESOURCE_DENIED}:
bad.remove(test)
else:
if bad:
print(count(len(bad), 'test'), "failed again:")
printlist(bad)
if ns.single: if ns.single:
if next_single_test: if next_single_test:
......
...@@ -380,6 +380,10 @@ IDLE ...@@ -380,6 +380,10 @@ IDLE
Tests Tests
----- -----
- Issue #24751: When running regrtest with the ``-w`` command line option,
a test run is no longer marked as a failure if all tests succeed when
re-run.
- Issue #21520: test_zipfile no longer fails if the word 'bad' appears - Issue #21520: test_zipfile no longer fails if the word 'bad' appears
anywhere in the name of the current directory. anywhere in the name of the current directory.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment