mirror of https://gitlab.com/ita1024/waf.git
Merge branch 'dump_unittest_output' into 'waf-2.1'
Tools: unit tests: dump full output if requested See merge request ita1024/waf!2351
This commit is contained in:
commit
54ef761d10
|
@ -276,11 +276,15 @@ def summary(bld):
|
|||
for result in lst:
|
||||
if not result.exit_code:
|
||||
Logs.pprint('GREEN', ' %s' % result.test_path)
|
||||
if getattr(Options.options, 'dump_test_results', True):
|
||||
Logs.pprint('NORMAL', result.out.decode('utf-8'))
|
||||
|
||||
Logs.pprint('GREEN' if tfail == 0 else 'RED', ' tests that fail %d/%d' % (tfail, total))
|
||||
for result in lst:
|
||||
if result.exit_code:
|
||||
Logs.pprint('RED', ' %s' % result.test_path)
|
||||
if getattr(Options.options, 'dump_test_results', True):
|
||||
Logs.pprint('NORMAL', result.err.decode('utf-8'))
|
||||
|
||||
def set_exit_code(bld):
|
||||
"""
|
||||
|
@ -317,4 +321,6 @@ def options(opt):
|
|||
help='Run the unit tests using the test-cmd string example "--testcmd="valgrind --error-exitcode=1 %s" to run under valgrind')
|
||||
opt.add_option('--dump-test-scripts', action='store_true', default=False,
|
||||
help='Create python scripts to help debug tests', dest='dump_test_scripts')
|
||||
opt.add_option('--dump-test-results', action='store_true', default=False,
|
||||
help='Print unit tests full output', dest='dump_test_results')
|
||||
|
||||
|
|
Loading…
Reference in New Issue