Title: [270173] trunk/Tools
Revision
270173
Author
[email protected]
Date
2020-11-26 18:05:58 -0800 (Thu, 26 Nov 2020)

Log Message

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

Reviewed by Jonathan Bedard.

* CISupport/build-webkit-org/steps.py:
(Run32bitJSCTests):
(Run32bitJSCTests.start): Initialized log observer.
(Run32bitJSCTests.parseOutputLine): Parse each log line as they come.
(Run32bitJSCTests.countFailures): Updated to return failedTestCount.

Modified Paths

Diff

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


--- trunk/Tools/CISupport/build-webkit-org/steps.py	2020-11-27 01:21:57 UTC (rev 270172)
+++ trunk/Tools/CISupport/build-webkit-org/steps.py	2020-11-27 02:05:58 UTC (rev 270173)
@@ -911,6 +911,7 @@
     ]
     failedTestsFormatString = "%d regression%s found."
     logfiles = {"json": jsonFileName}
+    test_summary_re = re.compile(r'\s*(?P<count>\d+) failures? found.')  # e.g.: 2 failures found.
 
     def __init__(self, *args, **kwargs):
         kwargs['logEnviron'] = False
@@ -919,11 +920,22 @@
     def start(self):
         if USE_BUILDBOT_VERSION2:
             self.workerEnvironment[RESULTS_SERVER_API_KEY] = os.getenv(RESULTS_SERVER_API_KEY)
+            self.log_observer = ParseByLineLogObserver(self.parseOutputLine)
+            self.addLogObserver('stdio', self.log_observer)
+            self.failedTestCount = 0
         else:
             self.slaveEnvironment[RESULTS_SERVER_API_KEY] = os.getenv(RESULTS_SERVER_API_KEY)
         return shell.Test.start(self)
 
+    def parseOutputLine(self, line):
+        match = self.test_summary_re.match(line)
+        if match:
+            self.failedTestCount = int(match.group('count'))
+
     def countFailures(self, cmd):
+        if USE_BUILDBOT_VERSION2:
+            return self.failedTestCount
+
         logText = cmd.logs['stdio'].getText()
         # We're looking for the line that looks like this: 0 failures found.
         regex = re.compile(r'\s*(?P<count>\d+) failures? found.')

Modified: trunk/Tools/ChangeLog (270172 => 270173)


--- trunk/Tools/ChangeLog	2020-11-27 01:21:57 UTC (rev 270172)
+++ trunk/Tools/ChangeLog	2020-11-27 02:05:58 UTC (rev 270173)
@@ -1,3 +1,16 @@
+2020-11-26  Aakash Jain  <[email protected]>
+
+        [build.webkit.org] Update Run32bitJSCTests step for new buildbot
+        https://bugs.webkit.org/show_bug.cgi?id=219085
+
+        Reviewed by Jonathan Bedard.
+
+        * CISupport/build-webkit-org/steps.py:
+        (Run32bitJSCTests):
+        (Run32bitJSCTests.start): Initialized log observer.
+        (Run32bitJSCTests.parseOutputLine): Parse each log line as they come.
+        (Run32bitJSCTests.countFailures): Updated to return failedTestCount.
+
 2020-11-26  Frederic Wang  <[email protected]>
 
         [GTK] Allow WebKitTestServer to run non-loopback addresses for API tests
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to