summaryrefslogtreecommitdiff
path: root/Tools/compiler/regrtest.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2007-05-14 22:03:55 +0000
committerGuido van Rossum <guido@python.org>2007-05-14 22:03:55 +0000
commita8add0ec5ef05c26e1641b8310b65ddd75c0fec3 (patch)
tree1626110463ca617ab105990ee1923f6ee65c7476 /Tools/compiler/regrtest.py
parent827b055ffe8060ac229cda8d75eb24176cc697c0 (diff)
downloadcpython-git-a8add0ec5ef05c26e1641b8310b65ddd75c0fec3.tar.gz
Merged revisions 55270-55324 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/p3yk ........ r55271 | fred.drake | 2007-05-11 10:14:47 -0700 (Fri, 11 May 2007) | 3 lines remove jpeg, panel libraries for SGI; there is more IRIX stuff left over, I guess that should be removed too, but will leave for someone who is sure ........ r55280 | fred.drake | 2007-05-11 19:11:37 -0700 (Fri, 11 May 2007) | 1 line remove mention of file that has been removed ........ r55301 | brett.cannon | 2007-05-13 17:38:05 -0700 (Sun, 13 May 2007) | 4 lines Remove rexec and Bastion from the stdlib. This also eliminates the need for f_restricted on frames. This in turn negates the need for PyEval_GetRestricted() and PyFrame_IsRestricted(). ........ r55303 | brett.cannon | 2007-05-13 19:22:22 -0700 (Sun, 13 May 2007) | 2 lines Remove the md5 and sha modules. ........ r55305 | george.yoshida | 2007-05-13 19:45:55 -0700 (Sun, 13 May 2007) | 2 lines fix markup ........ r55306 | neal.norwitz | 2007-05-13 19:47:57 -0700 (Sun, 13 May 2007) | 1 line Get the doc building again after some removals. ........ r55307 | neal.norwitz | 2007-05-13 19:50:45 -0700 (Sun, 13 May 2007) | 1 line Get test_pyclbr passing again after getstatus was removed from commands. This "test case" was weird since it was just importing a seemingly random module. Remove the import ........ r55322 | brett.cannon | 2007-05-14 14:09:20 -0700 (Mon, 14 May 2007) | 3 lines Remove the compiler package. Will eventually need a mechanism to byte compile an AST. ........
Diffstat (limited to 'Tools/compiler/regrtest.py')
-rw-r--r--Tools/compiler/regrtest.py83
1 files changed, 0 insertions, 83 deletions
diff --git a/Tools/compiler/regrtest.py b/Tools/compiler/regrtest.py
deleted file mode 100644
index d86d746055..0000000000
--- a/Tools/compiler/regrtest.py
+++ /dev/null
@@ -1,83 +0,0 @@
-"""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 compileFile
-
-import os
-import sys
-import test
-import tempfile
-
-def copy_test_suite():
- dest = tempfile.mkdtemp()
- os.system("cp -r %s/* %s" % (test.__path__[0], dest))
- print "Creating copy of test suite in", dest
- return dest
-
-def copy_library():
- dest = tempfile.mkdtemp()
- libdir = os.path.split(test.__path__[0])[0]
- print "Found standard library in", libdir
- print "Creating copy of standard library in", dest
- os.system("cp -r %s/* %s" % (libdir, dest))
- return dest
-
-def compile_files(dir):
- print "Compiling", dir, "\n\t",
- line_len = 10
- for file in os.listdir(dir):
- base, ext = os.path.splitext(file)
- if ext == '.py':
- 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,
- try:
- compileFile(source)
- except SyntaxError as err:
- print err
- continue
- # make sure the .pyc file is not over-written
- os.chmod(source + "c", 444)
- elif file == 'CVS':
- pass
- else:
- path = os.path.join(dir, file)
- if os.path.isdir(path):
- print
- print
- compile_files(path)
- print "\t",
- line_len = 10
- print
-
-def run_regrtest(lib_dir):
- test_dir = os.path.join(lib_dir, "test")
- os.chdir(test_dir)
- os.system("PYTHONPATH=%s %s -v regrtest.py" % (lib_dir, sys.executable))
-
-def cleanup(dir):
- os.system("rm -rf %s" % dir)
-
-def raw_input(prompt):
- sys.stdout.write(prompt)
- sys.stdout.flush()
- return sys.stdin.readline()
-
-def main():
- lib_dir = copy_library()
- compile_files(lib_dir)
- run_regrtest(lib_dir)
- raw_input("Cleanup?")
- cleanup(lib_dir)
-
-if __name__ == "__main__":
- main()