aboutsummaryrefslogtreecommitdiff
path: root/packages/Python/lldbsuite/test/issue_verification
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-01-02 19:26:05 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-01-02 19:26:05 +0000
commit14f1b3e8826ce43b978db93a62d1166055db5394 (patch)
tree0a00ad8d3498783fe0193f3b656bca17c4c8697d /packages/Python/lldbsuite/test/issue_verification
parent4ee8c119c71a06dcad1e0fecc8c675e480e59337 (diff)
downloadsrc-14f1b3e8826ce43b978db93a62d1166055db5394.tar.gz
src-14f1b3e8826ce43b978db93a62d1166055db5394.zip
Vendor import of lldb trunk r290819:vendor/lldb/lldb-trunk-r290819
Notes
Notes: svn path=/vendor/lldb/dist/; revision=311128 svn path=/vendor/lldb/lldb-trunk-r290819/; revision=311129; tag=vendor/lldb/lldb-trunk-r290819
Diffstat (limited to 'packages/Python/lldbsuite/test/issue_verification')
-rw-r--r--packages/Python/lldbsuite/test/issue_verification/TestRerunFileLevelTimeout.py.park33
1 files changed, 33 insertions, 0 deletions
diff --git a/packages/Python/lldbsuite/test/issue_verification/TestRerunFileLevelTimeout.py.park b/packages/Python/lldbsuite/test/issue_verification/TestRerunFileLevelTimeout.py.park
new file mode 100644
index 000000000000..9422624207ce
--- /dev/null
+++ b/packages/Python/lldbsuite/test/issue_verification/TestRerunFileLevelTimeout.py.park
@@ -0,0 +1,33 @@
+"""Tests that a timeout is detected by the testbot."""
+from __future__ import print_function
+
+import atexit
+import time
+
+from lldbsuite.test import decorators
+import rerun_base
+
+
+class RerunTimeoutTestCase(rerun_base.RerunBaseTestCase):
+ def maybe_do_timeout(self):
+ # Do the timeout here if we're going to time out.
+ if self.should_generate_issue():
+ # We time out this time.
+ while True:
+ try:
+ time.sleep(1)
+ except:
+ print("ignoring exception during sleep")
+
+ # call parent
+ super(RerunTimeoutTestCase, self).tearDown()
+
+ @decorators.no_debug_info_test
+ def test_timeout_file_level_timeout_rerun_succeeds(self):
+ """Tests that file-level timeout is cleared on rerun."""
+
+ # This test just needs to pass. It is the exit hook (outside
+ # the test method) that will time out.
+
+ # Add the exit handler that will time out the first time around.
+ atexit.register(RerunTimeoutTestCase.maybe_do_timeout, self)