summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/lldbtest.py
diff options
context:
space:
mode:
authorPavel Labath <labath@google.com>2015-12-16 12:09:45 +0000
committerPavel Labath <labath@google.com>2015-12-16 12:09:45 +0000
commit25e241b006559ec6cb188ac32fb7fba0f358bc1b (patch)
tree2d5f44039d9bc9fe87938fb5072b6dce95f1ec08 /lldb/packages/Python/lldbsuite/test/lldbtest.py
parent48568cbe18020b64d2cce24b0804fd36295738d5 (diff)
downloadbcm5719-llvm-25e241b006559ec6cb188ac32fb7fba0f358bc1b.tar.gz
bcm5719-llvm-25e241b006559ec6cb188ac32fb7fba0f358bc1b.zip
[test] Add ability to expect timeouts
Summary: This adds ability to mark test that do not complete due to hangs, crashes, etc., as "expected", to avoid flagging the build red for a known problem. Functionally, this extends the scope of the existing expectedFailureXXX decorators to cover these states as well. Once this is in, I will start replacing the magic list of failing tests in dosep.py with our regular annotations which should hopefully make code simpler. Reviewers: tfiala Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D15530 llvm-svn: 255763
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/lldbtest.py')
-rw-r--r--lldb/packages/Python/lldbsuite/test/lldbtest.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/lldbtest.py b/lldb/packages/Python/lldbsuite/test/lldbtest.py
index 51e11a7ca9c..7c244ba1a9d 100644
--- a/lldb/packages/Python/lldbsuite/test/lldbtest.py
+++ b/lldb/packages/Python/lldbsuite/test/lldbtest.py
@@ -598,6 +598,10 @@ def expectedFailure(expected_fn, bugnumber=None):
from unittest2 import case
self = args[0]
if expected_fn(self):
+ if configuration.results_formatter_object is not None:
+ # Mark this test as expected to fail.
+ configuration.results_formatter_object.handle_event(
+ EventBuilder.event_for_mark_test_expected_failure(self))
xfail_func = unittest2.expectedFailure(func)
xfail_func(*args, **kwargs)
else:
OpenPOWER on IntegriCloud