Implement errorlogs builtin option.

pull/438/head
Hemmo Nieminen 9 years ago
parent 7fb04c207b
commit 2eb392cdc0
  1. 2
      mesonbuild/backend/ninjabackend.py
  2. 1
      mesonbuild/coredata.py

@ -586,6 +586,8 @@ int dummy;
cmd = [ sys.executable, self.environment.get_build_command(), '--internal', 'test' ]
if not self.environment.coredata.get_builtin_option('stdsplit'):
cmd += ['--no-stdsplit']
if self.environment.coredata.get_builtin_option('errorlogs'):
cmd += ['--print-errorlogs']
cmd += [ test_data ]
elem = NinjaBuildElement(self.all_outputs, 'test', 'CUSTOM_COMMAND', ['all', 'PHONY'])
elem.add_item('COMMAND', cmd)

@ -211,6 +211,7 @@ builtin_options = {
'default_library' : [ UserComboOption, 'Default library type.', [ 'shared', 'static' ], 'shared' ],
'backend' : [ UserComboOption, 'Backend to use.', [ 'ninja', 'vs2010', 'xcode' ], 'ninja' ],
'stdsplit' : [ UserBooleanOption, 'Split stdout and stderr in test logs.', True ],
'errorlogs' : [ UserBooleanOption, "Whether to print the logs from failing tests.", False ],
}
forbidden_target_names = {'clean': None,

Loading…
Cancel
Save