Enhance the display of parallel configuration tests

This commit is contained in:
Thomas Nagy 2016-08-15 22:48:29 +02:00
parent 4ff5b8b7a7
commit 26fc0cfced
No known key found for this signature in database
GPG Key ID: 49B4C67C05277AAA
3 changed files with 26 additions and 6 deletions

View File

@ -1,3 +1,10 @@
NEW IN WAF 1.9.3
----------------
* Enable configuration task class lookup in conf.multicheck
* Enable individual output lines in conf.multicheck
* Updated examples for stripping executables
* More documentation
NEW IN WAF 1.9.2
----------------
* Fix a Python 3 encoding error when displaying the file hash in 'waf dist' #1769

View File

@ -36,10 +36,10 @@ def configure(conf):
conf.check_endianness()
conf.multicheck(
{'header_name':'stdio.h'},
{'header_name':'unistd.h'},
{'header_name':'stdlib.h'},
msg = 'Checking for standard headers',
{'header_name':'stdio.h', 'msg':'... stdio'},
{'header_name':'unistd.h', 'msg':'... unistd'},
{'header_name':'stdlib.h', 'msg':'... stdlib', 'okmsg': 'aye', 'errmsg': 'nope'},
msg = 'Checking for headers in parallel',
mandatory = False
)
conf.check_cc(header_name='stdio.h', auto_add_header_name=True)

View File

@ -1318,10 +1318,23 @@ def multicheck(self, *k, **kw):
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)
break
else:
self.end_msg('ok', **kw)
# optional output lines on msg/okmsg/errmsg
for x in tasks:
if 'msg' in x.args:
self.start_msg(x.args['msg'])
if x.hasrun != Task.SUCCESS:
self.end_msg(x.args.get('errmsg', 'no'), 'YELLOW')
else:
self.end_msg(x.args.get('okmsg', 'yes'), 'GREEN')
for x in tasks:
if x.hasrun != Task.SUCCESS:
self.end_msg(kw.get('errmsg', 'no'), color='YELLOW', **kw)
self.fatal(kw.get('fatalmsg') or 'One of the tests has failed, read config.log for more information')
self.end_msg('ok', **kw)