aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRonny Pfannschmidt <Ronny.Pfannschmidt@gmx.de>2012-03-02 17:04:52 +0100
committerRonny Pfannschmidt <Ronny.Pfannschmidt@gmx.de>2012-03-02 17:04:52 +0100
commit477408acd2d57145cd64d4890ad519fa2f2886b7 (patch)
tree3286b3a1b6e0f742891d71b2e4a19a073c6b2d90 /testrunner
parentmerge default (diff)
downloadpypy-477408acd2d57145cd64d4890ad519fa2f2886b7.tar.gz
pypy-477408acd2d57145cd64d4890ad519fa2f2886b7.tar.bz2
pypy-477408acd2d57145cd64d4890ad519fa2f2886b7.zip
testrunner: only do the monkeypatching in scratchbox if its required
Diffstat (limited to 'testrunner')
-rw-r--r--testrunner/scratchbox_runner.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/testrunner/scratchbox_runner.py b/testrunner/scratchbox_runner.py
index 57c978f0de..46d8c44456 100644
--- a/testrunner/scratchbox_runner.py
+++ b/testrunner/scratchbox_runner.py
@@ -14,14 +14,14 @@ def run_scratchbox(args, cwd, out, timeout=None):
def dry_run_scratchbox(args, cwd, out, timeout=None):
return dry_run(args_for_scratchbox(cwd, args), cwd, out, timeout)
-import runner
-# XXX hack hack hack
-dry_run = runner.dry_run
-run = runner.run
+if __name__ == '__main__':
+ import runner
+ # XXX hack hack hack
+ dry_run = runner.dry_run
+ run = runner.run
-runner.dry_run = dry_run_scratchbox
-runner.run = run_scratchbox
+ runner.dry_run = dry_run_scratchbox
+ runner.run = run_scratchbox
-if __name__ == '__main__':
import sys
runner.main(sys.argv)