[pypy-svn] r15552 - pypy/dist/pypy/translator/goal
hpk at codespeak.net
hpk at codespeak.net
Wed Aug 3 14:35:54 CEST 2005
Author: hpk
Date: Wed Aug 3 14:35:53 2005
New Revision: 15552
Modified:
pypy/dist/pypy/translator/goal/runtranslate.sh
pypy/dist/pypy/translator/goal/translate_pypy.py
Log:
preparing batch mode (translate_pypy.py should
then not do interactive stuff)
Modified: pypy/dist/pypy/translator/goal/runtranslate.sh
==============================================================================
--- pypy/dist/pypy/translator/goal/runtranslate.sh (original)
+++ pypy/dist/pypy/translator/goal/runtranslate.sh Wed Aug 3 14:35:53 2005
@@ -2,7 +2,7 @@
# stopping on the first error
#python translate_pypy.py -no-c -no-o -text -no-snapshot -fork
# running it all
-python translate_pypy.py -no-o -text -t-insist -no-snapshot
+python translate_pypy.py -no-o -text -t-insist -no-snapshot $*
# How to work in parallel:
Modified: pypy/dist/pypy/translator/goal/translate_pypy.py
==============================================================================
--- pypy/dist/pypy/translator/goal/translate_pypy.py (original)
+++ pypy/dist/pypy/translator/goal/translate_pypy.py Wed Aug 3 14:35:53 2005
@@ -290,6 +290,7 @@
'-save': False,
'-fork': False,
'-llinterpret': False,
+ '-batch': False,
}
listen_port = None
argiter = iter(sys.argv[1:])
@@ -504,15 +505,21 @@
print
func, args = pdb_plus_show.set_trace, ()
if options['-text']:
- func(*args)
+ if options['-batch']:
+ print >>sys.stderr, "batch mode, not calling interactive helpers"
+ else:
+ func(*args)
else:
- start, show, stop, cleanup = run_server()
- pdb_plus_show.show = show
- debugger = run_in_thread(func, args, stop)
- debugger.start()
- start()
- debugger.join()
- cleanup()
+ if options['-batch']:
+ print >>sys.stderr, "batch mode, not calling interactive helpers"
+ else:
+ start, show, stop, cleanup = run_server()
+ pdb_plus_show.show = show
+ debugger = run_in_thread(func, args, stop)
+ debugger.start()
+ start()
+ debugger.join()
+ cleanup()
try:
err = None
@@ -542,7 +549,11 @@
sys.path.insert(0, os.path.dirname(targetspec))
execfile(targetspec+'.py', targetspec_dic)
print "Analysing target as defined by %s" % targetspec
- print 'options in effect:', options
+ print 'options in effect:'
+ optnames = options.keys()
+ optnames.sort()
+ for name in optnames:
+ print ' %25s: %s' %(name, options[name])
try:
analyse(targetspec_dic['target'])
except TyperError:
@@ -588,6 +599,6 @@
raise
except:
debug(True)
+ raise SystemExit(1)
else:
debug(False)
-
More information about the Pypy-commit
mailing list