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
56db16cd
Commit
56db16cd
authored
Mar 24, 2016
by
Victor Stinner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
regrtest: when parallel tests are interrupted, display progress
parent
2b60b723
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
6 deletions
+18
-6
Lib/test/libregrtest/runtest_mp.py
Lib/test/libregrtest/runtest_mp.py
+18
-6
No files found.
Lib/test/libregrtest/runtest_mp.py
View file @
56db16cd
...
...
@@ -21,6 +21,9 @@ from test.libregrtest.setup import setup_tests
# Display the running tests if nothing happened last N seconds
PROGRESS_UPDATE
=
30.0
# seconds
# If interrupted, display the wait process every N seconds
WAIT_PROGRESS
=
2.0
# seconds
def
run_test_in_subprocess
(
testname
,
ns
):
"""Run the given test in a subprocess with --slaveargs.
...
...
@@ -224,9 +227,18 @@ def run_tests_multiprocess(regrtest):
if
use_timeout
:
faulthandler
.
cancel_dump_traceback_later
()
running
=
[
worker
.
current_test
for
worker
in
workers
]
running
=
list
(
filter
(
bool
,
running
))
if
running
:
print
(
"Waiting for %s"
%
', '
.
join
(
running
))
for
worker
in
workers
:
worker
.
join
()
# If tests are interrupted, wait until tests complete
wait_start
=
time
.
monotonic
()
while
True
:
running
=
[
worker
.
current_test
for
worker
in
workers
]
running
=
list
(
filter
(
bool
,
running
))
if
not
running
:
break
dt
=
time
.
monotonic
()
-
wait_start
line
=
"Waiting for %s (%s tests)"
%
(
', '
.
join
(
running
),
len
(
running
))
if
dt
>=
WAIT_PROGRESS
:
line
=
"%s since %.0f sec"
%
(
line
,
dt
)
print
(
line
)
for
worker
in
workers
:
worker
.
join
(
WAIT_PROGRESS
)
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