]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - packages/Python/lldbsuite/test/issue_verification/TestSignal.py.park
Vendor import of lldb trunk r256945:
[FreeBSD/FreeBSD.git] / packages / Python / lldbsuite / test / issue_verification / TestSignal.py.park
1 """Tests that an exceptional exit is detected by the testbot."""
2
3 from __future__ import print_function
4
5 import os
6 import signal
7 import time
8
9 import lldbsuite.test.lldbtest as lldbtest
10
11
12 class ExceptionalExitTestCase(lldbtest.TestBase):
13     """Forces exceptional exit."""
14     mydir = lldbtest.TestBase.compute_mydir(__file__)
15
16     @lldbtest.skipIfWindows
17     def test_buildbot_catches_exceptional_exit(self):
18         """Force process to die with exceptional exit."""
19
20         # Sleep for a couple seconds
21         try:
22             time.sleep(5)
23         except:
24             pass
25
26         os.kill(os.getpid(), signal.SIGKILL)