[Buildbot-devel] Question on getting custom text to show up in waterfall.

Ben Greear greearb at candelatech.com
Fri Jun 18 15:38:54 UTC 2010

I've managed to get some custom log files generated by overriding the
ShellCommand object:

class MyShellCommand(ShellCommand):
   def createSummary(self, log):
     failures = []
     passed = []
     pcount = 0
     fcount = 0
     for line in log.readlines():
         if "Tests Failed" in line:
             fcount += 1
         elif "Test Failed" in line:
             fcount += 1
         elif "Tests Succeeded" in line:
             pcount += 1
         elif "Test Passed" in line:
             pcount += 1

     failures.append("Total test failures: %i" % fcount)
     passed.append("Total test successes: %i" % pcount)
     self.addCompleteLog('failures', "".join(failures))
     self.addCompleteLog('passed', "".join(passed))

My factory looks like this:

f2 = factory.BuildFactory()
f2.addStep(Git(repourl=gitrepourl, mode="copy"))
f2.addStep(ShellCommand(command=["rm", "-fr", "obj"], workdir="build/xorp", descriptionDone="clean"))
f2.addStep(ShellCommand(command=["scons"], workdir="build/xorp", description="compiling", descriptionDone="compile"))
f2.addStep(MyShellCommand(command=["scons", "check"], workdir="build/xorp", description="checking", descriptionDone="check"))

I would now like to have the waterfall show a summary of passed
and failed, something like:

P: 400  F: 6

Where the 400 and 6 relate to pcount and fcount.

The idea is to be able to quickly glance at the waterfall page to see if
any particular slave is testing different than others, and longer-term, to
hopefully see passed tests increase and failed tests decrease.

Anyone know how to go about doing this?


Ben Greear <greearb at candelatech.com>
Candela Technologies Inc  http://www.candelatech.com

More information about the devel mailing list