[rtems-source-builder commit] sb/config: Terminate building on an error.

Chris Johns chrisj at rtems.org
Wed Apr 11 02:01:33 UTC 2018


Module:    rtems-source-builder
Branch:    master
Commit:    162cbda055624472ef817b7a9b6ccd65cf97e155
Changeset: http://git.rtems.org/rtems-source-builder/commit/?id=162cbda055624472ef817b7a9b6ccd65cf97e155

Author:    Chris Johns <chrisj at rtems.org>
Date:      Tue Apr 10 17:59:48 2018 +1000

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.

---

 source-builder/sb/config.py | 14 ++++++++------
 1 file 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 '}':




More information about the vc mailing list