2
0
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:
Jurko Gospodnetić
2012-06-19 10:06:12 +00:00
parent 33794c942a
commit a2a8daaec6
2 changed files with 4 additions and 7 deletions

View File

@@ -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())

View File

@@ -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)
###############################################################################