Ejemplo n.º 1
0
    def _upload_results_archive_for_patch(self, patch, results_archive_zip):
        if not self._port:
            self._create_port()

        bot_id = self._tool.status_server.bot_id or "bot"
        description = "Archive of layout-test-results from %s for %s" % (
            bot_id, self._port.name())
        # results_archive is a ZipFile object, grab the File object (.fp) to pass to Mechanize for uploading.
        results_archive_file = results_archive_zip.fp
        # Rewind the file object to start (since Mechanize won't do that automatically)
        # See https://bugs.webkit.org/show_bug.cgi?id=54593
        results_archive_file.seek(0)
        # FIXME: This is a small lie to always say run-webkit-tests since Chromium uses new-run-webkit-tests.
        # We could make this code look up the test script name off the port.
        comment_text = "The attached test failures were seen while running run-webkit-tests on the %s.\n" % (
            self.name)
        # FIXME: We could easily list the test failures from the archive here,
        # currently callers do that separately.
        comment_text += BotInfo(self._tool, self._port.name()).summary_text()
        self._tool.bugs.add_attachment_to_bug(
            patch.bug_id(),
            results_archive_file,
            description,
            filename="layout-test-results.zip",
            comment_text=comment_text)
Ejemplo n.º 2
0
 def _upload_results_archive_for_patch(self, patch, results_archive_zip):
     bot_id = self._tool.status_server.bot_id or "bot"
     description = "Archive of layout-test-results from %s" % bot_id
     # results_archive is a ZipFile object, grab the File object (.fp) to pass to Mechanize for uploading.
     results_archive_file = results_archive_zip.fp
     # Rewind the file object to start (since Mechanize won't do that automatically)
     # See https://bugs.webkit.org/show_bug.cgi?id=54593
     results_archive_file.seek(0)
     comment_text = "The attached test failures were seen while running run-webkit-tests on the %s.\n" % (self.name)
     # FIXME: We could easily list the test failures from the archive here.
     comment_text += BotInfo(self._tool).summary_text()
     self._tool.bugs.add_attachment_to_bug(patch.bug_id(), results_archive_file, description, filename="layout-test-results.zip", comment_text=comment_text)
Ejemplo n.º 3
0
 def __init__(self, tool, bot_name):
     self._tool = tool
     self._bot_name = bot_name
     self._bot_info = BotInfo(tool)
Ejemplo n.º 4
0
 def test_summary_text(self):
     tool = MockTool()
     self.assertEqual(
         BotInfo(tool, 'port-name').summary_text(),
         "Port: port-name  Platform: MockPlatform 1.0")