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
0179a180
Kaydet (Commit)
0179a180
authored
Haz 06, 2004
tarafından
Skip Montanaro
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
add -L flag to cause leaks(1) command to run just before exit
üst
4d5bc603
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
2 deletions
+13
-2
regrtest.py
Lib/test/regrtest.py
+13
-2
No files found.
Lib/test/regrtest.py
Dosyayı görüntüle @
0179a180
...
...
@@ -20,6 +20,7 @@ Command line options:
-h: help -- print this text and exit
-t: threshold -- call gc.set_threshold(N)
-T: coverage -- turn on code coverage using the trace module
-L: runleaks -- run the leaks(1) command just before exit
If non-option arguments are present, they are names for tests to run,
unless -x is given, in which case they are names for tests not to run.
...
...
@@ -42,6 +43,10 @@ or more test names per line. Whitespace is ignored. Blank lines and
lines beginning with '#' are ignored. This is especially useful for
whittling down failures involving interactions among tests.
-L causes the leaks(1) command to be run just before exit if it exists.
leaks(1) is available on Mac OS X and presumably on some other
FreeBSD-derived systems.
-u is used to specify which special resource intensive tests to run,
such as those requiring large file support or network connectivity.
The argument is a comma-separated list of words indicating the
...
...
@@ -118,7 +123,7 @@ def usage(code, msg=''):
def
main
(
tests
=
None
,
testdir
=
None
,
verbose
=
0
,
quiet
=
False
,
generate
=
False
,
exclude
=
False
,
single
=
False
,
randomize
=
False
,
fromfile
=
None
,
findleaks
=
False
,
use_resources
=
None
,
trace
=
False
):
findleaks
=
False
,
use_resources
=
None
,
trace
=
False
,
runleaks
=
False
):
"""Execute a test suite.
This also parses command-line options and modifies its behavior
...
...
@@ -143,10 +148,11 @@ def main(tests=None, testdir=None, verbose=0, quiet=False, generate=False,
test_support
.
record_original_stdout
(
sys
.
stdout
)
try
:
opts
,
args
=
getopt
.
getopt
(
sys
.
argv
[
1
:],
'hvgqxsrf:lu:t:T'
,
opts
,
args
=
getopt
.
getopt
(
sys
.
argv
[
1
:],
'hvgqxsrf:lu:t:T
L
'
,
[
'help'
,
'verbose'
,
'quiet'
,
'generate'
,
'exclude'
,
'single'
,
'random'
,
'fromfile'
,
'findleaks'
,
'use='
,
'threshold='
,
'trace'
,
'runleaks'
])
except
getopt
.
error
,
msg
:
usage
(
2
,
msg
)
...
...
@@ -174,6 +180,8 @@ def main(tests=None, testdir=None, verbose=0, quiet=False, generate=False,
fromfile
=
a
elif
o
in
(
'-l'
,
'--findleaks'
):
findleaks
=
True
elif
o
in
(
'-L'
,
'--runleaks'
):
runleaks
=
True
elif
o
in
(
'-t'
,
'--threshold'
):
import
gc
gc
.
set_threshold
(
int
(
a
))
...
...
@@ -350,6 +358,9 @@ def main(tests=None, testdir=None, verbose=0, quiet=False, generate=False,
r
=
tracer
.
results
()
r
.
write_results
(
show_missing
=
True
,
summary
=
True
,
coverdir
=
coverdir
)
if
runleaks
:
os
.
system
(
"leaks
%
d"
%
os
.
getpid
())
sys
.
exit
(
len
(
bad
)
>
0
)
...
...
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