Mercurial > bitten > bitten-test
changeset 387:7cd9a26134f5
Default behavior of slaves is now to stop building when an error is raised by a step set to onerror='fail'. onerror='continue' can be used to get the old behavior, while onerror='ignore' is also still available for completely ignoring failed steps.
author | cmlenz |
---|---|
date | Thu, 26 Jul 2007 19:40:55 +0000 |
parents | 4cf556eb1cf1 |
children | 3ba9430a5d87 |
files | bitten/recipe.py bitten/slave.py |
diffstat | 2 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/bitten/recipe.py +++ b/bitten/recipe.py @@ -188,9 +188,9 @@ if type == Recipe.ERROR: errors.append((generator, output)) if errors: - if self.onerror == 'fail': + if self.onerror != 'ignore': raise BuildError('Build step %s failed' % self.id) - log.warning('Ignoring errors in step %s (%s)', self.id, + log.warning('Continuing despite errors in step %s (%s)', self.id, ', '.join([error[1] for error in errors]))
--- a/bitten/slave.py +++ b/bitten/slave.py @@ -245,6 +245,9 @@ step.id) if not self.session.dry_run: self.channel.send_ans(msgno, beep.Payload(xml)) + if step_failed and step.onerror == 'fail': + log.warning('Stopping build due to failure') + break except InvalidRecipeError, e: log.warning('Build step %s failed: %s', step.id, e) duration = datetime.utcnow() - started