# HG changeset patch # User cmlenz # Date 1185478855 0 # Node ID 7cd9a26134f51a6f73cff661d724f1528cfd5439 # Parent 4cf556eb1cf1d51cb424151ce23fb0d87b943d21 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. diff --git a/bitten/recipe.py b/bitten/recipe.py --- 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])) diff --git a/bitten/slave.py b/bitten/slave.py --- 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