Fix log() output so you can cut-and-paste it verbatim into a command line.
It used to say: redo: t/all redo: hello and now it says: redo t/all redo t/hello ie. there's no colon, and the path is intact. That means if the build fails, you can cut-and-paste 'redo t/hello', add a -v, and try to debug what went wrong.
This commit is contained in:
parent
3c42645cdf
commit
9c349cf652
3 changed files with 5 additions and 4 deletions
4
redo.py
4
redo.py
|
|
@ -28,6 +28,7 @@ if not os.environ.get('REDO_BASE', ''):
|
|||
base = newbase
|
||||
break
|
||||
os.environ['REDO_BASE'] = base
|
||||
os.environ['REDO_STARTDIR'] = os.getcwd()
|
||||
|
||||
import vars
|
||||
from helpers import *
|
||||
|
|
@ -90,11 +91,10 @@ def build(t):
|
|||
os.path.basename(t), 'FIXME', os.path.basename(tmpname)]
|
||||
if vars.VERBOSE:
|
||||
argv[1] += 'v'
|
||||
log('%s\n' % t)
|
||||
log('%s\n' % relpath(t, vars.STARTDIR))
|
||||
rv = subprocess.call(argv, preexec_fn=lambda: _preexec(t),
|
||||
stdout=f.fileno())
|
||||
st = os.stat(tmpname)
|
||||
#log('rv: %d (%d bytes) (%r)\n' % (rv, st.st_size, dofile))
|
||||
stampfile = sname('stamp', t)
|
||||
if rv==0:
|
||||
if st.st_size:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue