Add a new -k (--keep-going) option, like make has.
Previously, the default was to *always* keep going, which is actually not usually what you want. Now we actually exit correctly after an error. Of course you still might have multiple errors before existing if you were building in parallel.
This commit is contained in:
parent
660e26c276
commit
b937e62d89
3 changed files with 11 additions and 3 deletions
|
|
@ -116,7 +116,7 @@ def main(targets, buildfunc):
|
|||
|
||||
def done(t, rv):
|
||||
if rv:
|
||||
err('%s: exit code was %r\n' % (t, rv))
|
||||
#err('%s: exit code was %r\n' % (t, rv))
|
||||
retcode[0] = 1
|
||||
|
||||
for i in range(len(targets)):
|
||||
|
|
@ -127,6 +127,8 @@ def main(targets, buildfunc):
|
|||
|
||||
for t in targets:
|
||||
jwack.get_token(t)
|
||||
if retcode[0] and not vars.KEEP_GOING:
|
||||
break
|
||||
lock = state.Lock(t)
|
||||
lock.trylock()
|
||||
if not lock.owned:
|
||||
|
|
@ -139,6 +141,8 @@ def main(targets, buildfunc):
|
|||
|
||||
while locked or jwack.running():
|
||||
jwack.wait_all()
|
||||
if retcode[0] and not vars.KEEP_GOING:
|
||||
break
|
||||
if locked:
|
||||
t = locked.pop(0)
|
||||
lock = state.Lock(t)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue