Title: [269804] trunk/Tools
Revision
269804
Author
[email protected]
Date
2020-11-13 15:46:07 -0800 (Fri, 13 Nov 2020)

Log Message

[build.webkit.org] Update CompileWebKit step for new buildbot
https://bugs.webkit.org/show_bug.cgi?id=218922

Reviewed by Jonathan Bedard.

* CISupport/build-webkit-org/steps.py:
(CompileWebKit.start): Initialize logobserver.
(CompileWebKit.parseOutputLine): Method to process each line.
(CompileWebKit._addToLog): Method to add to the log which is displayed in UI.
(CompileWebKit.createSummary):

Modified Paths

Diff

Modified: trunk/Tools/CISupport/build-webkit-org/steps.py (269803 => 269804)


--- trunk/Tools/CISupport/build-webkit-org/steps.py	2020-11-13 22:56:53 UTC (rev 269803)
+++ trunk/Tools/CISupport/build-webkit-org/steps.py	2020-11-13 23:46:07 UTC (rev 269804)
@@ -30,7 +30,6 @@
 import re
 import socket
 import json
-import cStringIO
 import urllib
 
 APPLE_WEBKIT_AWS_PROXY = "http://proxy01.webkit.org:3128"
@@ -47,6 +46,7 @@
     from buildbot.process.results import Results
     from buildbot.steps.source.svn import SVN
 else:
+    import cStringIO
     from buildbot.steps.source import SVN
     logobserver = lambda: None
     logobserver.LineConsumerLogObserver = type('LineConsumerLogObserver', (object,), {})
@@ -272,6 +272,10 @@
         architecture = self.getProperty('architecture')
         additionalArguments = self.getProperty('additionalArguments')
 
+        if USE_BUILDBOT_VERSION2:
+            self.log_observer = ParseByLineLogObserver(self.parseOutputLine)
+            self.addLogObserver('stdio', self.log_observer)
+
         if additionalArguments:
             self.setCommand(self.command + additionalArguments)
         if platform in ('mac', 'ios', 'tvos', 'watchos') and architecture:
@@ -289,7 +293,24 @@
 
         return shell.Compile.start(self)
 
+    def parseOutputLine(self, line):
+        if "arning:" in line:
+            self._addToLog('warnings', line + '\n')
+        if "rror:" in line:
+            self._addToLog('errors', line + '\n')
+
+    @defer.inlineCallbacks
+    def _addToLog(self, logName, message):
+        try:
+            log = self.getLog(logName)
+        except KeyError:
+            log = yield self.addLog(logName)
+        log.addStdout(message)
+
     def createSummary(self, log):
+        # FIXME: delete this method after switching to Buildbot v2
+        if USE_BUILDBOT_VERSION2:
+            return
         platform = self.getProperty('platform')
         if platform.startswith('mac'):
             warnings = []

Modified: trunk/Tools/ChangeLog (269803 => 269804)


--- trunk/Tools/ChangeLog	2020-11-13 22:56:53 UTC (rev 269803)
+++ trunk/Tools/ChangeLog	2020-11-13 23:46:07 UTC (rev 269804)
@@ -1,3 +1,16 @@
+2020-11-13  Aakash Jain  <[email protected]>
+
+        [build.webkit.org] Update CompileWebKit step for new buildbot
+        https://bugs.webkit.org/show_bug.cgi?id=218922
+
+        Reviewed by Jonathan Bedard.
+
+        * CISupport/build-webkit-org/steps.py:
+        (CompileWebKit.start): Initialize logobserver.
+        (CompileWebKit.parseOutputLine): Method to process each line.
+        (CompileWebKit._addToLog): Method to add to the log which is displayed in UI.
+        (CompileWebKit.createSummary):
+
 2020-11-13  Jonathan Bedard  <[email protected]>
 
         REGRESSION: r269514 Reset server port before restarting webserver
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to