summaryrefslogtreecommitdiffstats
path: root/source-builder/sb/config.py
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2018-04-10 17:59:48 +1000
committerChris Johns <chrisj@rtems.org>2018-04-10 17:59:48 +1000
commit162cbda055624472ef817b7a9b6ccd65cf97e155 (patch)
treebd8511837cf57f000de4b958fba2a880abf3ffc6 /source-builder/sb/config.py
parentThe libexpat project has moved to github. Fetch expat from github. (diff)
downloadrtems-source-builder-162cbda055624472ef817b7a9b6ccd65cf97e155.tar.bz2
sb/config: Terminate building on an error.
This changes the previous functionality where the RSB switch to dry run mode. This functionality can be enabled by adding `--keep-going`. Close #3209.
Diffstat (limited to 'source-builder/sb/config.py')
-rw-r--r--source-builder/sb/config.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/source-builder/sb/config.py b/source-builder/sb/config.py
index a4f739b..74c002e 100644
--- a/source-builder/sb/config.py
+++ b/source-builder/sb/config.py
@@ -312,13 +312,15 @@ class file:
log.output(text)
def _error(self, msg):
- err = 'error: %s' % (self._name_line_msg(msg))
- log.stderr(err)
- log.output(err)
- self.in_error = True
if not self.opts.dry_run():
- log.stderr('warning: switched to dry run due to errors')
- self.opts.set_dry_run()
+ if self.opts.keep_going():
+ err = 'error: %s' % (self._name_line_msg(msg))
+ log.stderr(err)
+ log.output(err)
+ self.in_error = True
+ log.stderr('warning: switched to dry run due to errors')
+ self.opts.set_dry_run()
+ raise error.general(self._name_line_msg(msg))
def _label(self, name):
if name.startswith('%{') and name[-1] is '}':