[Buildbot-commits] [Buildbot] #965: WebStatus crashes when program exits with exit code > 5

Buildbot buildbot-devel at lists.sourceforge.net
Mon Aug 16 23:06:35 UTC 2010


#965: WebStatus crashes when program exits with exit code > 5
------------------------+---------------------------------------------------
Reporter:  PiotrSikora  |       Owner:           
    Type:  defect       |      Status:  new      
Priority:  critical     |   Milestone:  undecided
 Version:  0.8.1        |    Keywords:           
------------------------+---------------------------------------------------
 When program (in this case PerlModuleTest) exits with non-standard exit
 code:
 {{{
 program finished with exit code 9
 }}}

 then WebStatus (and probably other parts of the system) fails, because
 this exit code is recorded instead of (0..5) for (success, warnings,
 failure, skipped, exception, retry).

 For example, waterfall fails like that:
 {{{
 /usr/local/lib/python2.5/site-packages/buildbot/status/web/waterfall.py,
 line 175 in getBox
 class_ = "BuildStep " + build_get_class(self.original)
 /usr/local/lib/python2.5/site-packages/buildbot/status/web/base.py, line
 86 in build_get_class
 return builder.Results[result]
 <type 'exceptions.IndexError'>: list index out of range
 Locals: result 9
 }}}

 I've created simple work-around, which fixes WebStatus issues for me, but
 I believe that this should be fixed at the source (place where buildbot
 records exit status from the program) and not here:
 {{{
 --- buildbot/status/builder.py.orig Tue Aug  3 00:01:37 2010
 +++ buildbot/status/builder.py      Tue Aug  3 00:02:25 2010
 @@ -905,7 +905,10 @@
          @rtype:   tuple of int, list of strings
          @returns: (result, strings)
          """
 -        return (self.results, self.text2)
 +        if (self.results >= 0) and (self.results <= 5):
 +            return (self.results, self.text2)
 +        else:
 +            return (2, self.text2)

      def hasStatistic(self, name):
          """Return true if this step has a value for the given statistic.
 }}}

 To be honest I'm not sure whatever this should fall-back to 2 (failure) or
 4 (exception).

-- 
Ticket URL: <http://buildbot.net/trac/ticket/965>
Buildbot <http://buildbot.net/>
Buildbot: build/test automation


More information about the Commits mailing list