Skip to content
This repository was archived by the owner on May 21, 2019. It is now read-only.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 7fc0b98

Browse files
committedDec 9, 2015
create 3 issues for testbots: FAIL, ERROR (exceptional), and TIMEOUT
This change is a trial balloon to verify that the default test summary output sends the right output for the buildbot issue detection script. The effect of this change will be reverted after verifying the testbot behavior. This change will not stay in as is and will knowingly create noise, see this thread: http://lists.llvm.org/pipermail/lldb-dev/2015-December/009048.html git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@255131 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent e138196 commit 7fc0b98

File tree

4 files changed

+66
-0
lines changed

4 files changed

+66
-0
lines changed
 
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Tests in this directory are intentionally setup to
2+
fail, error, timeout, etc. to verify that the buildbots
3+
pick up errors. The tests in this directory will be
4+
parked/removed/renamed after verifying they trigger
5+
as expected.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
"""Tests that a FAIL is detected by the testbot."""
2+
3+
from __future__ import print_function
4+
5+
import lldbsuite.test.lldbtest as lldbtest
6+
7+
8+
class FailTestCase(lldbtest.TestBase):
9+
"""Forces test failure."""
10+
mydir = lldbtest.TestBase.compute_mydir(__file__)
11+
12+
def test_buildbot_catches_failure(self):
13+
"""Issues a failing test assertion."""
14+
self.assertTrue(
15+
False,
16+
"This will always fail, buildbot should flag this.")
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
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)
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
"""Tests that a timeout is detected by the testbot."""
2+
from __future__ import print_function
3+
4+
import time
5+
6+
import lldbsuite.test.lldbtest as lldbtest
7+
8+
9+
class TimeoutTestCase(lldbtest.TestBase):
10+
"""Forces test timeout."""
11+
mydir = lldbtest.TestBase.compute_mydir(__file__)
12+
13+
def test_buildbot_catches_timeout(self):
14+
"""Tests that timeout logic kicks in and is picked up."""
15+
while True:
16+
try:
17+
time.sleep(1)
18+
except:
19+
print("ignoring exception during sleep")

0 commit comments

Comments
 (0)
This repository has been archived.