Fixed conf.multicheck error handling

This commit is contained in:
Thomas Nagy 2015-05-23 15:09:37 +02:00
parent f048d6d20f
commit ea59b302c5
No known key found for this signature in database
GPG Key ID: 67A565EDFDF90E64
1 changed files with 9 additions and 1 deletions

View File

@ -1167,6 +1167,7 @@ def multicheck(self, *k, **kw):
self.keep = False
self.returned_tasks = []
self.task_sigs = {}
self.progress_bar = 0
def total(self):
return len(tasks)
def to_log(self, *k, **kw):
@ -1197,10 +1198,17 @@ def multicheck(self, *k, **kw):
for x in tasks:
x.logger.memhandler.flush()
if p.error:
for x in p.error:
if getattr(x, 'err_msg', None):
self.to_log(x.err_msg)
self.end_msg('fail', color='RED')
raise Errors.WafError('There is an error in the library, read config.log for more information')
for x in tasks:
if x.hasrun != Task.SUCCESS:
self.end_msg(kw.get('errmsg', 'no'), color='YELLOW', **kw)
self.fatal(kw.get('fatalmsg', None) or 'One of the tests has failed, see the config.log for more information')
self.fatal(kw.get('fatalmsg', None) or 'One of the tests has failed, read config.log for more information')
self.end_msg('ok', **kw)