[pypy-svn] r29168 - pypy/dist/lib-python
hpk at codespeak.net
hpk at codespeak.net
Thu Jun 22 20:42:10 CEST 2006
Author: hpk
Date: Thu Jun 22 20:42:09 2006
New Revision: 29168
Modified:
pypy/dist/lib-python/conftest.py
Log:
issue225 testing
for now, let all tests run through test/regrtest.py and not our own
shortcut. this avoids the test_threading.py hang (i don't know
exactly why - i am guessing it is because of some IO issue
but it probably makes sense anyway to use regrtest.py for
python regression testing, although it adds a somewhat
constant overhead).
side-effect: test_extcall doesn't compare correctly against
our modified output (modified-2.4.1/test/output/test_extcall)
but likely it's best to modify regrtest.py to have an extra
option where one can specify a specific outputpath
Modified: pypy/dist/lib-python/conftest.py
==============================================================================
--- pypy/dist/lib-python/conftest.py (original)
+++ pypy/dist/lib-python/conftest.py Thu Jun 22 20:42:09 2006
@@ -885,8 +885,6 @@
python = sys.executable
pypy_script = pypydir.join('bin', 'py.py')
alarm_script = pypydir.join('tool', 'alarm.py')
- regr_script = pypydir.join('tool', 'pytest',
- 'run-script', 'regrverbose.py')
pypy_options = []
if regrtest.oldstyle:
pypy_options.append('--oldstyle')
@@ -901,21 +899,27 @@
# previously we only did it if regrtest.outputpath() was True
# the regrverbose script now does the logic that CPython
# uses in its regrtest.py
- regrrun = str(regr_script)
- regrrun_verbosity = regrtest.getoutputpath() and '0' or '1'
-
+
+ #if regrtest.getoutputpath():
+ # regr_script = pypydir.join('tool', 'pytest',
+ # 'run-script', 'regrverbose.py')
+ # regr_script_options = "1"
+ #else:
+ regr_script = regrtestdir.join("regrtest.py")
+ regr_script_options = " "
+
+ regrrun = "%s %s" %(regr_script, regr_script_options)
TIMEOUT = gettimeout()
if option.use_compiled:
execpath, info = getexecutable()
- cmd = "%s %s %s %s" %(
+ cmd = "%s %s %s" %(
execpath,
- regrrun, regrrun_verbosity, fspath.purebasename)
- print cmd
+ regrrun, fspath.purebasename)
else:
- cmd = "%s %s %d %s %s %s %s %s" %(
+ cmd = "%s %s %d %s %s %s %s" %(
python, alarm_script, TIMEOUT,
pypy_script, sopt,
- regrrun, regrrun_verbosity, fspath.purebasename)
+ regrrun, fspath.purebasename)
return cmd
def run(self):
@@ -955,13 +959,16 @@
try:
stdout = tempdir.join(self.fspath.basename) + '.out'
stderr = tempdir.join(self.fspath.basename) + '.err'
+ print >>sys.stderr, "executing:", cmd
if sys.platform == 'win32':
+ #stderr.write("executing: %s" %(cmd,)) XXX not sure we could append like below
status = os.system("%s >%s 2>%s" %(cmd, stdout, stderr))
if status>=0:
status = status
else:
status = 'abnormal termination 0x%x' % status
else:
+ stderr.write("executing: %s" %(cmd,))
status = os.system("%s >>%s 2>>%s" %(cmd, stdout, stderr))
if os.WIFEXITED(status):
status = os.WEXITSTATUS(status)
@@ -1001,19 +1008,19 @@
outcome = 'OK'
expectedpath = regrtest.getoutputpath()
- if not exit_status:
- if expectedpath is not None:
- expected = expectedpath.read(mode='rU')
- test_stdout = "%s\n%s" % (self.fspath.purebasename, test_stdout)
- if test_stdout != expected:
- exit_status = 2
- res, out, err = callcapture(reportdiff, expected, test_stdout)
- outcome = 'ERROUT'
- result.addnamedtext('reportdiff', out)
- else:
- if 'FAIL' in test_stdout or 'ERROR' in test_stderr:
- outcome = 'FAIL'
- elif timedout:
+ #if expectedpath is not None:
+ # if not exit_status:
+ # expected = expectedpath.read(mode='rU')
+ # test_stdout = "%s\n%s" % (self.fspath.purebasename, test_stdout)
+ # if test_stdout != expected:
+ # exit_status = 2
+ # res, out, err = callcapture(reportdiff, expected, test_stdout)
+ # outcome = 'ERROUT'
+ # result.addnamedtext('reportdiff', out)
+ # else:
+ # if 'FAIL' in test_stdout or 'ERROR' in test_stderr:
+ # outcome = 'FAIL'
+ if exit_status and timedout:
outcome = "T/O"
else:
outcome = "ERR"
More information about the Pypy-commit
mailing list