mirror of
https://github.com/boostorg/build.git
synced 2026-02-16 01:12:13 +00:00
Added support for explicitly failing Boost Build tests without displaying the changes caused by the last build command.
[SVN r79002]
This commit is contained in:
@@ -572,11 +572,12 @@ class Tester(TestCmd.TestCmd):
|
||||
else:
|
||||
return result
|
||||
|
||||
def fail_test(self, condition, dump_stdio=True, dump_stack=True):
|
||||
def fail_test(self, condition, dump_difference=True, dump_stdio=True,
|
||||
dump_stack=True):
|
||||
if not condition:
|
||||
return
|
||||
|
||||
if hasattr(self, 'difference'):
|
||||
if dump_difference and hasattr(self, 'difference'):
|
||||
f = StringIO.StringIO()
|
||||
self.difference.pprint(f)
|
||||
annotation("changes caused by the last build command", f.getvalue())
|
||||
|
||||
@@ -187,12 +187,8 @@ def collectDebugInfo():
|
||||
except:
|
||||
_info_exc()
|
||||
|
||||
# Avoid the 'changes caused by the last build command' report.
|
||||
if hasattr(t, 'difference'):
|
||||
del t.difference
|
||||
|
||||
# Report prepared annotations.
|
||||
t.fail_test(1, dump_stdio=False, dump_stack=False)
|
||||
t.fail_test(1, dump_difference=False, dump_stdio=False, dump_stack=False)
|
||||
|
||||
|
||||
###############################################################################
|
||||
|
||||
Reference in New Issue
Block a user