Beispiel #1
0
    def _print_blame_information_for_builder(self,
                                             builder_status,
                                             name_width,
                                             avoid_flakey_tests=True):
        builder = self.tool.buildbot.builder_with_name(builder_status["name"])
        (last_green_build,
         first_red_build) = builder.find_green_to_red_transition(
             builder_status["build_number"])
        if not last_green_build:
            self._print_builder_line(
                builder.name(), name_width,
                "FAIL (blame-list: sometime before %s?)" %
                first_red_build.revision())
            return

        suspect_revisions = range(first_red_build.revision(),
                                  last_green_build.revision(), -1)
        suspect_revisions.reverse()
        first_failure_message = ""
        if (first_red_build == builder.build(builder_status["build_number"])):
            first_failure_message = " FIRST FAILURE, possibly a flaky test"
        self._print_builder_line(
            builder.name(), name_width, "FAIL (blame-list: %s%s)" %
            (suspect_revisions, first_failure_message))
        for revision in suspect_revisions:
            commit_info = CommitInfo.commit_info_for_revision(
                self.tool.scm(), revision)
            self._print_blame_information_for_commit(commit_info)
Beispiel #2
0
    def _print_blame_information_for_builder(self, builder_status, name_width, avoid_flakey_tests=True):
        builder = self.tool.buildbot.builder_with_name(builder_status["name"])
        (last_green_build, first_red_build) = builder.find_green_to_red_transition(builder_status["build_number"])
        if not last_green_build:
            self._print_builder_line(builder.name(), name_width, "FAIL (blame-list: sometime before %s?)" % first_red_build.revision())
            return

        suspect_revisions = range(first_red_build.revision(), last_green_build.revision(), -1)
        suspect_revisions.reverse()
        first_failure_message = ""
        if (first_red_build == builder.build(builder_status["build_number"])):
            first_failure_message = " FIRST FAILURE, possibly a flaky test"
        self._print_builder_line(builder.name(), name_width, "FAIL (blame-list: %s%s)" % (suspect_revisions, first_failure_message))
        for revision in suspect_revisions:
            commit_info = CommitInfo.commit_info_for_revision(self.tool.scm(), revision)
            self._print_blame_information_for_commit(commit_info)
Beispiel #3
0
 def commit_info_for_revision(self, svn_revision):
     return CommitInfo.commit_info_for_revision(self._scm, svn_revision)