[pypy-svn] r59806 - in pypy/build/testrunner: . test
fijal at codespeak.net
fijal at codespeak.net
Sat Nov 8 15:56:42 CET 2008
Author: fijal
Date: Sat Nov 8 15:56:41 2008
New Revision: 59806
Added:
pypy/build/testrunner/test/__init__.py (contents, props changed)
Modified:
pypy/build/testrunner/runner.py
pypy/build/testrunner/test/test_runner.py
Log:
Remove the scratchbox-specific hacks completely
Modified: pypy/build/testrunner/runner.py
==============================================================================
--- pypy/build/testrunner/runner.py (original)
+++ pypy/build/testrunner/runner.py Sat Nov 8 15:56:41 2008
@@ -51,17 +51,6 @@
finally:
f.close()
-def args_for_scratchbox(cwd, args):
- return ['/scratchbox/login', '-d', str(cwd)] + args
-
-
-def run_scratchbox(args, cwd, out, timeout=None):
- username = os.environ['HOME'].split(os.sep)[-1]
- scratchboxdir = '/scratchbox/users/%s/home/%s' % (username, username)
- if cwd.startswith(scratchboxdir):
- cwd = cwd.lstrip(scratchboxdir)
- return run(args_for_scratchbox(cwd, args), cwd, out, timeout)
-
def dry_run(args, cwd, out, timeout=None):
f = out.open('w')
try:
@@ -70,9 +59,6 @@
f.close()
return 0
-def dry_run_scratchbox(args, cwd, out, timeout=None):
- return dry_run(args_for_scratchbox(cwd, args), cwd, out, timeout)
-
def getsignalname(n):
for name, value in signal.__dict__.items():
if value == n and name.startswith('SIG'):
@@ -80,18 +66,13 @@
return 'signal %d' % (n,)
def execute_test(cwd, test, out, logfname, interp, test_driver,
- do_dry_run=False, timeout=None, run_scratchbox=False):
+ do_dry_run=False, timeout=None):
args = interp+test_driver
args += ['--resultlog=%s' % logfname, test]
args = map(str, args)
if do_dry_run:
- if run_scratchbox:
- runfunc = dry_run_scratchbox
- else:
- runfunc = dry_run
- elif run_scratchbox:
- runfunc = run_scratchbox
+ runfunc = dry_run
else:
runfunc = run
@@ -137,8 +118,7 @@
exitcode = execute_test(root, test, one_output, logfname,
interp, test_driver, do_dry_run=dry_run,
- timeout=timeout,
- run_scratchbox=run_param.scratchbox)
+ timeout=timeout)
# xxx cfg cleanup after testdir
@@ -217,7 +197,6 @@
interp = [os.path.abspath(sys.executable)]
test_driver = [os.path.abspath(os.path.join('py', 'bin', 'py.test'))]
parallel_runs = 1
- scratchbox = False
timeout = None
cherrypick = None
@@ -275,8 +254,6 @@
parser.add_option("--dry-run", dest="dry_run", default=False,
action="store_true",
help="dry run"),
- parser.add_option("--scratchbox", dest="scratchbox", default=False,
- action="store_true"),
parser.add_option("--timeout", dest="timeout", default=None,
type="int",
help="timeout in secs for test processes")
@@ -320,7 +297,6 @@
if opts.timeout:
run_param.timeout = opts.timeout
run_param.dry_run = opts.dry_run
- run_param.scratchbox = opts.scratchbox
if run_param.dry_run:
print >>out, run_param.__dict__
Added: pypy/build/testrunner/test/__init__.py
==============================================================================
Modified: pypy/build/testrunner/test/test_runner.py
==============================================================================
--- pypy/build/testrunner/test/test_runner.py (original)
+++ pypy/build/testrunner/test/test_runner.py Sat Nov 8 15:56:41 2008
@@ -116,10 +116,6 @@
Killed by SIGSEGV.
"""
- def test_scratchbox(self):
- expected = ['/scratchbox/login', '-d', 'x/y', 'a', 'b']
- assert runner.args_for_scratchbox('x/y', ['a', 'b']) == expected
-
class RunnerTests(object):
with_thread = True
More information about the Pypy-commit
mailing list