[Buildbot-devel] Accessing Build Parameters from LogObserver

Tim Flink tim at mail.mew.co.jp
Wed Nov 15 04:24:42 UTC 2006


I am using Buildbot 0.7.4 on a C++ project with unit tests and I would 
like to have a new bug created in my bug tracking system when a test 
fails on the build. I have been able to add a bug when a test fails but 
I would like to include more information about the build like the build 
number, the user responsible for the build and the SVN revision number 
but I'm having trouble accessing that information from the LogLineObserver.

Is there a good way to access these properties from the LogLineObserver? 
If not, is there a way to pass non-standard parameters into the 
LogLineObserver without changing the buildbot source?

Thanks in advance for your time,

Tim



from buildbot.process.step import ShellCommand, LogLineObserver, 
WithProperties
from makeFailureTicket import makeTicket
 
class TracIssueReporter(LogLineObserver):
    buildNumber = 0
    properties = ""
   
    def outLineReceived(self, line):
        if "error:" in line:
            
makeTicket('/etc/tracTest.conf',self.buildNumber,self.properties)
   
    def setProperties(self,args):
        self.properties = args['properties']
           
 
class RunUtppTests(ShellCommand):
    command = ["scons test"]
    properties = "not changed"
    name = "utppTest"
    warnOnFailure = 1
    description = ["Running UTPP Tests"]
    descriptionDone = ["UTPP Tests"]
    
    def __init__(self, **kwargs):
        ShellCommand.__init__(self, **kwargs)   # always upcall!
        reporter = TracIssueReporter()
        self.addLogObserver('stdio', reporter)




More information about the devel mailing list