diff --git a/buildtests/runtests.py b/buildtests/runtests.py index 228d592..3b8a562 100755 --- a/buildtests/runtests.py +++ b/buildtests/runtests.py @@ -22,6 +22,7 @@ # particual test. import os, sys, glob, string +import pprint import shutil HOME = '..' @@ -87,8 +88,8 @@ def runtests(alltests, filters=None, configfile=None, run_executable=1): OTPS = ' -c "%s"' % configfile build_python = open("python_exe.build", "w") - build_python.write(sys.executable) - build_python.write("debug=%s" % __debug__) + build_python.write(sys.executable+"\n") + build_python.write("debug=%s" % __debug__+"\n") build_python.close() if not filters: tests = alltests @@ -102,9 +103,11 @@ def runtests(alltests, filters=None, configfile=None, run_executable=1): for test in tests: test = os.path.splitext(os.path.basename(test))[0] _msg("BUILDING TEST", test) - res = os.system(string.join([PYTHON, PYOPTS, os.path.join(HOME, 'Build.py'), - OPTS, test+".spec"], - ' ')) + prog = string.join([PYTHON, PYOPTS, os.path.join(HOME, 'Build.py'), + OPTS, test+".spec"], + ' ') + print "BUILDING:", prog + res = os.system(prog) if run_executable: _msg("EXECUTING TEST", test) # Run the test in a clean environment to make sure they're @@ -113,6 +116,7 @@ def runtests(alltests, filters=None, configfile=None, run_executable=1): prog = os.path.join('dist', test + '.exe') if not os.path.exists(prog): prog = os.path.join('dist', test, test + '.exe') + print "RUNNING:", prog res = os.system(prog) os.environ["PATH"] = path @@ -122,7 +126,7 @@ def runtests(alltests, filters=None, configfile=None, run_executable=1): else: _msg("TEST", test, "FAILED", short=1) counter["failed"].append(test) - print counter + pprint.pprint(counter) if __name__ == '__main__': diff --git a/buildtests/test14.py b/buildtests/test14.py index 3234544..48d86ab 100644 --- a/buildtests/test14.py +++ b/buildtests/test14.py @@ -26,7 +26,7 @@ if sys.version_info[:2] >= (2, 5): print "#"*50 import xml.etree.cElementTree as cET - pyexe = open("python_exe.build").read() + pyexe = open("python_exe.build").readline().strip() out = subprocess.Popen(pyexe + ' -c "import xml.etree.cElementTree as cET; print dir(cET)"', stdout=subprocess.PIPE, shell=True).stdout.read().strip() diff --git a/buildtests/test_getfilesystemencoding.py b/buildtests/test_getfilesystemencoding.py index 1d5301d..ff9410c 100644 --- a/buildtests/test_getfilesystemencoding.py +++ b/buildtests/test_getfilesystemencoding.py @@ -15,7 +15,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA -print "test_getfilesystemencoding sys.getfilesystemencoding()" +print "test_getfilesystemencoding" import sys if sys.version_info[:2] >= (2, 5): @@ -24,11 +24,11 @@ if sys.version_info[:2] >= (2, 5): assert type(email.Header) == email.LazyImporter - pyexe = open("python_exe.build").read() + pyexe = open("python_exe.build").readline().strip() out = subprocess.Popen(pyexe + ' -c "import sys; print sys.getfilesystemencoding()"', stdout=subprocess.PIPE, shell=True).stdout.read().strip() assert str(sys.getfilesystemencoding()) == out, (str(sys.getfilesystemencoding()), out) print "test_getfilesystemencoding DONE" else: - print "Python 2.5 test14 skipped" + print "Python < 2.5 test14 skipped"