Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
56db16cd
Kaydet (Commit)
56db16cd
authored
Mar 24, 2016
tarafından
Victor Stinner
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
regrtest: when parallel tests are interrupted, display progress
üst
2b60b723
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
6 deletions
+18
-6
runtest_mp.py
Lib/test/libregrtest/runtest_mp.py
+18
-6
No files found.
Lib/test/libregrtest/runtest_mp.py
Dosyayı görüntüle @
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
%.0
f 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