1 """Tests that a timeout is detected by the testbot."""
2 from __future__ import print_function
7 from lldbsuite.test import decorators
11 class RerunTimeoutTestCase(rerun_base.RerunBaseTestCase):
12 def maybe_do_timeout(self):
13 # Do the timeout here if we're going to time out.
14 if self.should_generate_issue():
15 # We time out this time.
20 print("ignoring exception during sleep")
23 super(RerunTimeoutTestCase, self).tearDown()
25 @decorators.no_debug_info_test
26 def test_timeout_file_level_timeout_rerun_succeeds(self):
27 """Tests that file-level timeout is cleared on rerun."""
29 # This test just needs to pass. It is the exit hook (outside
30 # the test method) that will time out.
32 # Add the exit handler that will time out the first time around.
33 atexit.register(RerunTimeoutTestCase.maybe_do_timeout, self)