From a2a8daaec67ae7f81ef1d019dad5175fae36b996 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jurko=20Gospodneti=C4=87?= Date: Tue, 19 Jun 2012 10:06:12 +0000 Subject: [PATCH] Added support for explicitly failing Boost Build tests without displaying the changes caused by the last build command. [SVN r79002] --- v2/test/BoostBuild.py | 5 +++-- v2/test/collect_debug_info.py | 6 +----- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/v2/test/BoostBuild.py b/v2/test/BoostBuild.py index 4e9e39f8a..db76c6953 100644 --- a/v2/test/BoostBuild.py +++ b/v2/test/BoostBuild.py @@ -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()) diff --git a/v2/test/collect_debug_info.py b/v2/test/collect_debug_info.py index d4fc57bf7..b8feb86df 100755 --- a/v2/test/collect_debug_info.py +++ b/v2/test/collect_debug_info.py @@ -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) ###############################################################################