| 1 | """Run the Python regression test using the compiler
|
|---|
| 2 |
|
|---|
| 3 | This test runs the standard Python test suite using bytecode generated
|
|---|
| 4 | by this compiler instead of by the builtin compiler.
|
|---|
| 5 |
|
|---|
| 6 | The regression test is run with the interpreter in verbose mode so
|
|---|
| 7 | that import problems can be observed easily.
|
|---|
| 8 | """
|
|---|
| 9 |
|
|---|
| 10 | from compiler import compileFile
|
|---|
| 11 |
|
|---|
| 12 | import os
|
|---|
| 13 | import sys
|
|---|
| 14 | import test
|
|---|
| 15 | import tempfile
|
|---|
| 16 |
|
|---|
| 17 | def copy_test_suite():
|
|---|
| 18 | dest = tempfile.mkdtemp()
|
|---|
| 19 | os.system("cp -r %s/* %s" % (test.__path__[0], dest))
|
|---|
| 20 | print "Creating copy of test suite in", dest
|
|---|
| 21 | return dest
|
|---|
| 22 |
|
|---|
| 23 | def copy_library():
|
|---|
| 24 | dest = tempfile.mkdtemp()
|
|---|
| 25 | libdir = os.path.split(test.__path__[0])[0]
|
|---|
| 26 | print "Found standard library in", libdir
|
|---|
| 27 | print "Creating copy of standard library in", dest
|
|---|
| 28 | os.system("cp -r %s/* %s" % (libdir, dest))
|
|---|
| 29 | return dest
|
|---|
|
|---|