Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
f3c524d5
Commit
f3c524d5
authored
Mar 23, 2011
by
Antoine Pitrou
Browse files
Options
Browse Files
Download
Plain Diff
Issue #11653: fix -W with -j in regrtest.
parents
15d0c1d0
e44b1258
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
7 deletions
+16
-7
Lib/test/regrtest.py
Lib/test/regrtest.py
+14
-7
Misc/NEWS
Misc/NEWS
+2
-0
No files found.
Lib/test/regrtest.py
View file @
f3c524d5
...
...
@@ -542,7 +542,7 @@ def main(tests=None, testdir=None, verbose=0, quiet=False,
args_tuple = (
(test, verbose, quiet),
dict(huntrleaks=huntrleaks, use_resources=use_resources,
debug=debug
)
debug=debug, rerun_failed=verbose3
)
)
yield (test, args_tuple)
pending = tests_and_args()
...
...
@@ -616,11 +616,9 @@ def main(tests=None, testdir=None, verbose=0, quiet=False,
globals=globals(), locals=vars())
else:
try:
result = runtest(test, verbose, quiet, huntrleaks, debug)
result = runtest(test, verbose, quiet, huntrleaks, debug,
rerun_failed=verbose3)
accumulate_result(test, result)
if verbose3 and result[0] == FAILED:
print("
Re
-
running
test
{}
in
verbose
mode
".format(test))
runtest(test, True, quiet, huntrleaks, debug)
except KeyboardInterrupt:
interrupted = True
break
...
...
@@ -765,7 +763,8 @@ def replace_stdout():
atexit.register(restore_stdout)
def runtest(test, verbose, quiet,
huntrleaks=False, debug=False, use_resources=None):
huntrleaks=False, debug=False, use_resources=None,
rerun_failed=False):
"""Run a single test.
test -- the name of the test
...
...
@@ -774,6 +773,7 @@ def runtest(test, verbose, quiet,
test_times -- a list of (time, test_name) pairs
huntrleaks -- run multiple times to test for leaks; requires a debug
build; a triple corresponding to -R's three arguments
rerun_failed -- if true, re-run in verbose mode when failed
Returns one of the test result constants:
INTERRUPTED KeyboardInterrupt when run under -j
...
...
@@ -788,7 +788,14 @@ def runtest(test, verbose, quiet,
if use_resources is not None:
support.use_resources = use_resources
try:
return runtest_inner(test, verbose, quiet, huntrleaks, debug)
result = runtest_inner(test, verbose, quiet, huntrleaks, debug)
if result[0] == FAILED and rerun_failed:
cleanup_test_droppings(test, verbose)
sys.stdout.flush()
sys.stderr.flush()
print("
Re
-
running
test
{}
in
verbose
mode
".format(test))
runtest(test, True, quiet, huntrleaks, debug)
return result
finally:
cleanup_test_droppings(test, verbose)
...
...
Misc/NEWS
View file @
f3c524d5
...
...
@@ -293,6 +293,8 @@ Tools/Demos
Tests
-----
- Issue #11653: fix -W with -j in regrtest.
- The email test suite now lives in the Lib/test/test_email package. The test
harness code has also been modernized to allow use of new unittest features.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment