Pavel Labath 25e241b006 [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
2015-12-16 12:09:45 +00:00

21 lines
593 B
Plaintext

"""Tests that a timeout is detected by the testbot."""
from __future__ import print_function
import time
import lldbsuite.test.lldbtest as lldbtest
class ExpectedTimeoutTestCase(lldbtest.TestBase):
"""Forces test timeout."""
mydir = lldbtest.TestBase.compute_mydir(__file__)
@lldbtest.expectedFailureAll()
def test_buildbot_sees_expected_timeout(self):
"""Tests that expected timeout logic kicks in and is picked up."""
while True:
try:
time.sleep(1)
except:
print("ignoring exception during sleep")