aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mesonbuild/backend/ninjabackend.py2
-rw-r--r--mesonbuild/coredata.py1
2 files changed, 3 insertions, 0 deletions
diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py
index cf75762..2a2f5b4 100644
--- a/mesonbuild/backend/ninjabackend.py
+++ b/mesonbuild/backend/ninjabackend.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)
diff --git a/mesonbuild/coredata.py b/mesonbuild/coredata.py
index 03e4355..ff45db5 100644
--- a/mesonbuild/coredata.py
+++ b/mesonbuild/coredata.py
@@ -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,