Exemplo n.º 1
0
 def printBuild(self, build, out=sys.stdout, withLogs=False):
     # helper for debugging: print a build
     yield self.enrichBuild(build, wantSteps=True, wantProperties=True, wantLogs=True)
     print("*** BUILD %d *** ==> %s (%s)" % (build['buildid'], build['state_string'],
                                             statusToString(build['results'])), file=out)
     for step in build['steps']:
         print("    *** STEP %s *** ==> %s (%s)" % (step['name'], step['state_string'],
                                                    statusToString(step['results'])), file=out)
         for url in step['urls']:
             print("       url:%s (%s)" % (url['name'], url['url']), file=out)
         for log in step['logs']:
             print("        log:%s (%d)" % (log['name'], log['num_lines']), file=out)
             if step['results'] != SUCCESS or withLogs:
                 self.printLog(log, out)
Exemplo n.º 2
0
 def printBuild(self, build, out=sys.stdout):
     # helper for debugging: print a build
     yield self.enrichBuild(build,
                            wantSteps=True,
                            wantProperties=True,
                            wantLogs=True)
     print >> out, "*** BUILD %d *** ==> %s (%s)" % (
         build['buildid'], build['state_string'],
         statusToString(build['results']))
     for step in build['steps']:
         print >> out, "    *** STEP %s *** ==> %s (%s)" % (
             step['name'], step['state_string'],
             statusToString(step['results']))
         for url in step['urls']:
             print >> out, "       url:%s (%s)" % (url['name'], url['url'])
         for log in step['logs']:
             print >> out, "        log:%s (%d)" % (log['name'],
                                                    log['num_lines'])
             if step['results'] != SUCCESS:
                 self.printLog(log, out)
Exemplo n.º 3
0
    def addBuildUrls(self, rclist):
        brids = {}
        for was_cb, results in rclist:
            if isinstance(results, tuple):
                results, brids = results

            if was_cb:  # errors were already logged in worstStatus
                for buildername, br in brids.iteritems():
                    builds = yield self.master.db.builds.getBuilds(buildrequestid=br)
                    for build in builds:
                        num = build["number"]
                        builderid = yield self.master.data.updates.findBuilderId(ascii2unicode(buildername))
                        url = self.master.status.getURLForBuild(builderid, num)
                        yield self.addURL("%s: %s #%d" % (statusToString(results), buildername, num), url)
Exemplo n.º 4
0
    def addBuildUrls(self, rclist):
        brids = {}
        for was_cb, results in rclist:
            if isinstance(results, tuple):
                results, brids = results

            if was_cb:  # errors were already logged in worstStatus
                for builderid, br in iteritems(brids):
                    builderDict = yield self.master.data.get(("builders", builderid))
                    builds = yield self.master.db.builds.getBuilds(buildrequestid=br)
                    for build in builds:
                        num = build['number']
                        url = self.master.status.getURLForBuild(builderid, num)
                        yield self.addURL("%s: %s #%d" % (statusToString(results),
                                                          builderDict["name"], num), url)
Exemplo n.º 5
0
    def addBuildUrls(self, rclist):
        brids = {}
        for was_cb, results in rclist:
            if isinstance(results, tuple):
                results, brids = results

            if was_cb:  # errors were already logged in worstStatus
                for buildername, br in brids.iteritems():
                    builds = yield self.master.db.builds.getBuilds(buildrequestid=br)
                    for build in builds:
                        num = build['number']
                        builderid = yield self.master.data.updates.findBuilderId(ascii2unicode(buildername))
                        url = self.master.status.getURLForBuild(builderid, num)
                        yield self.addURL("%s: %s #%d" % (statusToString(results),
                                                          buildername, num), url)
Exemplo n.º 6
0
    def addBuildUrls(self, rclist):
        brids = {}
        for was_cb, results in rclist:
            if isinstance(results, tuple):
                results, brids = results

            if was_cb:  # errors were already logged in worstStatus
                for builderid, br in brids.iteritems():
                    builderDict = yield self.master.data.get(("builders", builderid))
                    builds = yield self.master.db.builds.getBuilds(buildrequestid=br)
                    for build in builds:
                        num = build['number']
                        url = self.master.status.getURLForBuild(builderid, num)
                        yield self.addURL("%s: %s #%d" % (statusToString(results),
                                                          builderDict["name"], num), url)
Exemplo n.º 7
0
    def getDetectedStatus(self, mode, results, previous_results):

        if results == FAILURE:
            if "change" in mode and previous_results is not None and previous_results != results or \
                    "problem" in mode and previous_results and previous_results != FAILURE:
                text = "new failure"
            else:
                text = "failed build"
        elif results == WARNINGS:
            text = "The Buildbot has detected a problem in the build"
        elif results == SUCCESS:
            if "change" in mode and previous_results is not None and previous_results != results:
                text = "restored build"
            else:
                text = "passing build"
        elif results == EXCEPTION:
            text = "build exception"
        else:
            text = "%s build" % (statusToString(results))

        return text
Exemplo n.º 8
0
    def getDetectedStatus(self, mode, results, previous_results):

        if results == FAILURE:
            if "change" in mode and previous_results is not None and previous_results != results or \
                    "problem" in mode and previous_results and previous_results != FAILURE:
                text = "new failure"
            else:
                text = "failed build"
        elif results == WARNINGS:
            text = "The Buildbot has detected a problem in the build"
        elif results == SUCCESS:
            if "change" in mode and previous_results is not None and previous_results != results:
                text = "restored build"
            else:
                text = "passing build"
        elif results == EXCEPTION:
            text = "build exception"
        else:
            text = "%s build" % (statusToString(results))

        return text