summaryrefslogtreecommitdiffstats
path: root/source-builder/sb/setbuilder.py
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2013-02-21 10:17:24 +1100
committerChris Johns <chrisj@rtems.org>2013-02-21 10:17:24 +1100
commit729f0bb61f8ad1a6e11ff8af620b2f6f9848c8bd (patch)
treec01342364a7c510b4423358bb56ea4426ee7eb92 /source-builder/sb/setbuilder.py
parentMake the shell cmd path relative on error. (diff)
downloadrtems-source-builder-729f0bb61f8ad1a6e11ff8af620b2f6f9848c8bd.tar.bz2
Build sets can optional keep going on failure to support tool build testing.
The --keep-going option lets a build set continue if it fails. The keep going is only at the build set level and not at the package level.
Diffstat (limited to 'source-builder/sb/setbuilder.py')
-rw-r--r--source-builder/sb/setbuilder.py47
1 files changed, 27 insertions, 20 deletions
diff --git a/source-builder/sb/setbuilder.py b/source-builder/sb/setbuilder.py
index e9f9090..b6eb0b5 100644
--- a/source-builder/sb/setbuilder.py
+++ b/source-builder/sb/setbuilder.py
@@ -225,25 +225,31 @@ class buildset:
try:
builds = []
for s in range(0, len(configs)):
- if configs[s].endswith('.bset'):
- bs = buildset(configs[s],
- _configs = self.configs,
- _defaults = self.defaults,
- opts = self.opts)
- bs.build()
- del bs
- elif configs[s].endswith('.cfg'):
- b = build.build(configs[s], _defaults = self.defaults, opts = self.opts)
- if s == 0:
- tmproot = self.first_package(b)
- b.make()
- self.every_package(b, tmproot)
- if s == len(configs) - 1:
- self.last_package(b, tmproot)
- builds += [b]
- else:
- raise error.general('invalid config type: %s' % (configs[s]))
- if not self.opts.no_clean():
+ try:
+ if configs[s].endswith('.bset'):
+ bs = buildset(configs[s],
+ _configs = self.configs,
+ _defaults = self.defaults,
+ opts = self.opts)
+ bs.build()
+ del bs
+ elif configs[s].endswith('.cfg'):
+ b = build.build(configs[s], _defaults = self.defaults, opts = self.opts)
+ if s == 0:
+ tmproot = self.first_package(b)
+ b.make()
+ self.every_package(b, tmproot)
+ if s == len(configs) - 1:
+ self.last_package(b, tmproot)
+ builds += [b]
+ else:
+ raise error.general('invalid config type: %s' % (configs[s]))
+ except error.general, gerr:
+ if self.opts.get_arg('--keep-going'):
+ print gerr
+ else:
+ raise
+ if not self.opts.no_clean() or self.opts.get_arg('--keep-going'):
for b in builds:
_notice(self.opts, 'cleaning: %s' % (b.name()))
b.cleanup()
@@ -262,7 +268,8 @@ class buildset:
def run():
import sys
try:
- optargs = { '--list-configs': 'List available configurations',
+ optargs = { '--keep-going': 'Do not stop on error.',
+ '--list-configs': 'List available configurations',
'--list-bsets': 'List available build sets'}
opts, _defaults = defaults.load(sys.argv, optargs)
log.default = log.log(opts.logfiles())