Ejemplo n.º 1
0
 def __init__(self, parent, number):
     """
     @type  parent: L{BuilderStatus}
     @type  number: int
     """
     assert interfaces.IBuilderStatus(parent)
     self.builder = parent
     self.number = number
     self.watchers = []
     self.updates = {}
     self.finishedWatchers = []
     self.steps = []
     self.testResults = {}
     self.properties = Properties()
Ejemplo n.º 2
0
 def getBox(self, req):
     assert interfaces.IBuilderStatus(self.original)
     branches = [b for b in req.args.get("branch", []) if b]
     builder = self.original
     builds = list(builder.generateFinishedBuilds(map_branches(branches),
                                                  num_builds=1))
     if not builds:
         return Box(["none"], class_="LastBuild")
     b = builds[0]
     url = path_to_build(req, b)
     text = b.getText()
     tests_failed = b.getSummaryStatistic('tests-failed', operator.add, 0)
     if tests_failed: text.extend(["Failed tests: %d" % tests_failed])
     # TODO: maybe add logs?
     class_ = build_get_class(b)
     return Box(text, urlbase=url, class_="LastBuild %s" % class_)
Ejemplo n.º 3
0
 def __init__(self, parent, master, number):
     """
     @type  parent: L{BuilderStatus}
     @type  number: int
     """
     assert interfaces.IBuilderStatus(parent)
     self.builder = parent
     self.master = master
     self.number = number
     self.watchers = []
     self.updates = {}
     self.finishedWatchers = []
     self.steps = []
     self.testResults = {}
     self.resume = []
     self.resumeSlavepool = None
     self.savedStatus = False
     self.properties = properties.Properties()
Ejemplo n.º 4
0
 def getBox(self, req):
     assert interfaces.IBuilderStatus(self.original)
     branches = [b for b in req.args.get("branch", []) if b]
     builder = self.original
     builds = list(
         builder.generateFinishedBuilds(map_branches(branches),
                                        num_builds=1))
     if not builds:
         return Box(["none"], "white", class_="LastBuild")
     b = builds[0]
     name = b.getBuilder().getName()
     number = b.getNumber()
     url = path_to_build(req, b)
     text = b.getText()
     # TODO: maybe add logs?
     # TODO: add link to the per-build page at 'url'
     c = b.getColor()
     class_ = build_get_class(b)
     return Box(text, c, class_="LastBuild %s" % class_)