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.
This commit is contained in:
Chris Johns 2013-02-21 10:17:24 +11:00
parent 1b7e392fa1
commit 729f0bb61f

View File

@ -225,6 +225,7 @@ class buildset:
try: try:
builds = [] builds = []
for s in range(0, len(configs)): for s in range(0, len(configs)):
try:
if configs[s].endswith('.bset'): if configs[s].endswith('.bset'):
bs = buildset(configs[s], bs = buildset(configs[s],
_configs = self.configs, _configs = self.configs,
@ -243,7 +244,12 @@ class buildset:
builds += [b] builds += [b]
else: else:
raise error.general('invalid config type: %s' % (configs[s])) raise error.general('invalid config type: %s' % (configs[s]))
if not self.opts.no_clean(): 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: for b in builds:
_notice(self.opts, 'cleaning: %s' % (b.name())) _notice(self.opts, 'cleaning: %s' % (b.name()))
b.cleanup() b.cleanup()
@ -262,7 +268,8 @@ class buildset:
def run(): def run():
import sys import sys
try: 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'} '--list-bsets': 'List available build sets'}
opts, _defaults = defaults.load(sys.argv, optargs) opts, _defaults = defaults.load(sys.argv, optargs)
log.default = log.log(opts.logfiles()) log.default = log.log(opts.logfiles())