Skip to content

Commit

Permalink
Show "blamelist" on failed to build.
Browse files Browse the repository at this point in the history
  • Loading branch information
KATO Kazuyoshi committed Oct 8, 2009
1 parent 4404f7c commit 74bdccc
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 deletions.
3 changes: 3 additions & 0 deletions buildbot/status/words.py
Expand Up @@ -335,6 +335,9 @@ def buildFinished(self, builderName, build, results):
if buildurl:
r += " Build details are at %s" % buildurl

if build.getResults() != SUCCESS:
r += ' blamelist: ' + ', '.join([c.who for c in build.changes])

self.send(r)

def notify_for_finished(self, build):
Expand Down
22 changes: 11 additions & 11 deletions buildbot/test/test_status.py
Expand Up @@ -1339,7 +1339,7 @@ def test_notification_failed(self):

irc.message = ""
irc.buildFinished(my_builder.getName(), my_build, None)
self.failUnlessEqual(irc.message, "build #862 of builder834 is complete: Failure [step1 step2] Build details are at http://myserver/mypath?build=765", "Finish notification generated on failure with notify_events=['failed']")
self.failUnlessEqual(irc.message, "build #862 of builder834 is complete: Failure [step1 step2] Build details are at http://myserver/mypath?build=765 blamelist: author1", "Finish notification generated on failure with notify_events=['failed']")

irc.message = ""
my_build.results = builder.SUCCESS
Expand Down Expand Up @@ -1368,7 +1368,7 @@ def test_notification_exception(self):

irc.message = ""
irc.buildFinished(my_builder.getName(), my_build, None)
self.failUnlessEqual(irc.message, "build #862 of builder834 is complete: Exception [step1 step2] Build details are at http://myserver/mypath?build=765", "Finish notification generated on failure with notify_events=['exception']")
self.failUnlessEqual(irc.message, "build #862 of builder834 is complete: Exception [step1 step2] Build details are at http://myserver/mypath?build=765 blamelist: author1", "Finish notification generated on failure with notify_events=['exception']")

irc.message = ""
my_build.results = builder.SUCCESS
Expand Down Expand Up @@ -1400,7 +1400,7 @@ def do_x_to_y_notification_test(self, notify, previous_result, new_result, expec

def test_notification_successToFailure(self):
self.do_x_to_y_notification_test(notify="successToFailure", previous_result=builder.SUCCESS, new_result=builder.FAILURE,
expected_msg="build #862 of builder834 is complete: Failure [step1 step2] Build details are at http://myserver/mypath?build=765" )
expected_msg="build #862 of builder834 is complete: Failure [step1 step2] Build details are at http://myserver/mypath?build=765 blamelist: author1" )

self.do_x_to_y_notification_test(notify="successToFailure", previous_result=builder.SUCCESS, new_result=builder.SUCCESS,
expected_msg = "" )
Expand All @@ -1413,7 +1413,7 @@ def test_notification_successToFailure(self):

def test_notification_successToWarnings(self):
self.do_x_to_y_notification_test(notify="successToWarnings", previous_result=builder.SUCCESS, new_result=builder.WARNINGS,
expected_msg="build #862 of builder834 is complete: Warnings [step1 step2] Build details are at http://myserver/mypath?build=765" )
expected_msg="build #862 of builder834 is complete: Warnings [step1 step2] Build details are at http://myserver/mypath?build=765 blamelist: author1" )

self.do_x_to_y_notification_test(notify="successToWarnings", previous_result=builder.SUCCESS, new_result=builder.SUCCESS,
expected_msg = "" )
Expand All @@ -1426,7 +1426,7 @@ def test_notification_successToWarnings(self):

def test_notification_successToException(self):
self.do_x_to_y_notification_test(notify="successToException", previous_result=builder.SUCCESS, new_result=builder.EXCEPTION,
expected_msg="build #862 of builder834 is complete: Exception [step1 step2] Build details are at http://myserver/mypath?build=765" )
expected_msg="build #862 of builder834 is complete: Exception [step1 step2] Build details are at http://myserver/mypath?build=765 blamelist: author1" )

self.do_x_to_y_notification_test(notify="successToException", previous_result=builder.SUCCESS, new_result=builder.SUCCESS,
expected_msg = "" )
Expand Down Expand Up @@ -1456,7 +1456,7 @@ def test_notification_failureToSuccess(self):

def test_notification_failureToWarnings(self):
self.do_x_to_y_notification_test(notify="failureToWarnings", previous_result=builder.FAILURE, new_result=builder.WARNINGS,
expected_msg="build #862 of builder834 is complete: Warnings [step1 step2] Build details are at http://myserver/mypath?build=765" )
expected_msg="build #862 of builder834 is complete: Warnings [step1 step2] Build details are at http://myserver/mypath?build=765 blamelist: author1" )

self.do_x_to_y_notification_test(notify="failureToWarnings", previous_result=builder.FAILURE, new_result=builder.SUCCESS,
expected_msg = "" )
Expand All @@ -1469,7 +1469,7 @@ def test_notification_failureToWarnings(self):

def test_notification_failureToException(self):
self.do_x_to_y_notification_test(notify="failureToException", previous_result=builder.FAILURE, new_result=builder.EXCEPTION,
expected_msg="build #862 of builder834 is complete: Exception [step1 step2] Build details are at http://myserver/mypath?build=765" )
expected_msg="build #862 of builder834 is complete: Exception [step1 step2] Build details are at http://myserver/mypath?build=765 blamelist: author1" )

self.do_x_to_y_notification_test(notify="failureToException", previous_result=builder.FAILURE, new_result=builder.SUCCESS,
expected_msg = "" )
Expand All @@ -1486,7 +1486,7 @@ def test_notification_failureToException(self):

def test_notification_warningsToFailure(self):
self.do_x_to_y_notification_test(notify="warningsToFailure", previous_result=builder.WARNINGS, new_result=builder.FAILURE,
expected_msg="build #862 of builder834 is complete: Failure [step1 step2] Build details are at http://myserver/mypath?build=765" )
expected_msg="build #862 of builder834 is complete: Failure [step1 step2] Build details are at http://myserver/mypath?build=765 blamelist: author1" )

self.do_x_to_y_notification_test(notify="warningsToFailure", previous_result=builder.WARNINGS, new_result=builder.SUCCESS,
expected_msg = "" )
Expand All @@ -1512,7 +1512,7 @@ def test_notification_warningsToSuccess(self):

def test_notification_warningsToException(self):
self.do_x_to_y_notification_test(notify="warningsToException", previous_result=builder.WARNINGS, new_result=builder.EXCEPTION,
expected_msg="build #862 of builder834 is complete: Exception [step1 step2] Build details are at http://myserver/mypath?build=765" )
expected_msg="build #862 of builder834 is complete: Exception [step1 step2] Build details are at http://myserver/mypath?build=765 blamelist: author1" )

self.do_x_to_y_notification_test(notify="warningsToException", previous_result=builder.WARNINGS, new_result=builder.SUCCESS,
expected_msg = "" )
Expand All @@ -1528,7 +1528,7 @@ def test_notification_warningsToException(self):

def test_notification_exceptionToFailure(self):
self.do_x_to_y_notification_test(notify="exceptionToFailure", previous_result=builder.EXCEPTION, new_result=builder.FAILURE,
expected_msg="build #862 of builder834 is complete: Failure [step1 step2] Build details are at http://myserver/mypath?build=765" )
expected_msg="build #862 of builder834 is complete: Failure [step1 step2] Build details are at http://myserver/mypath?build=765 blamelist: author1" )

self.do_x_to_y_notification_test(notify="exceptionToFailure", previous_result=builder.EXCEPTION, new_result=builder.SUCCESS,
expected_msg = "" )
Expand All @@ -1541,7 +1541,7 @@ def test_notification_exceptionToFailure(self):

def test_notification_exceptionToWarnings(self):
self.do_x_to_y_notification_test(notify="exceptionToWarnings", previous_result=builder.EXCEPTION, new_result=builder.WARNINGS,
expected_msg="build #862 of builder834 is complete: Warnings [step1 step2] Build details are at http://myserver/mypath?build=765" )
expected_msg="build #862 of builder834 is complete: Warnings [step1 step2] Build details are at http://myserver/mypath?build=765 blamelist: author1" )

self.do_x_to_y_notification_test(notify="exceptionToWarnings", previous_result=builder.EXCEPTION, new_result=builder.SUCCESS,
expected_msg = "" )
Expand Down

0 comments on commit 74bdccc

Please sign in to comment.