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
ac148b5f
Kaydet (Commit)
ac148b5f
authored
Eki 13, 2000
tarafından
Jeremy Hylton
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
run the std regression test suite using bytecode produced by the compiler
üst
e7f710cc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
55 additions
and
0 deletions
+55
-0
regrtest.py
Tools/compiler/regrtest.py
+55
-0
No files found.
Tools/compiler/regrtest.py
0 → 100644
Dosyayı görüntüle @
ac148b5f
"""Run the Python regression test using the compiler
This test runs the standard Python test suite using bytecode generated
by this compiler instead of by the builtin compiler.
The regression test is run with the interpreter in verbose mode so
that import problems can be observed easily.
"""
from
compiler
import
compile
import
os
import
sys
import
test
import
tempfile
def
copy_test_suite
():
dest
=
tempfile
.
mktemp
()
os
.
mkdir
(
dest
)
os
.
system
(
"cp -r
%
s/*
%
s"
%
(
test
.
__path__
[
0
],
dest
))
print
"Creating copy of test suite in"
,
dest
return
dest
def
compile_files
(
dir
):
print
"Compiling"
,
line_len
=
10
for
file
in
os
.
listdir
(
dir
):
base
,
ext
=
os
.
path
.
splitext
(
file
)
if
ext
==
'.py'
and
base
[:
4
]
==
'test'
:
source
=
os
.
path
.
join
(
dir
,
file
)
line_len
=
line_len
+
len
(
file
)
+
1
if
line_len
>
75
:
print
"
\n\t
"
,
line_len
=
len
(
source
)
+
9
print
file
,
compile
(
source
)
# make sure the .pyc file is not over-written
os
.
chmod
(
source
+
"c"
,
444
)
print
def
run_regrtest
(
test_dir
):
os
.
chdir
(
test_dir
)
os
.
system
(
"
%
s -v regrtest.py"
%
sys
.
executable
)
def
cleanup
(
dir
):
os
.
system
(
"rm -rf
%
s"
%
dir
)
def
main
():
test_dir
=
copy_test_suite
()
compile_files
(
test_dir
)
run_regrtest
(
test_dir
)
cleanup
(
test_dir
)
if
__name__
==
"__main__"
:
main
()
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