Title: [269958] trunk/Tools
Revision
269958
Author
[email protected]
Date
2020-11-18 08:05:17 -0800 (Wed, 18 Nov 2020)

Log Message

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

Reviewed by Jonathan Bedard.

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

Modified Paths

Diff

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


--- trunk/Tools/CISupport/build-webkit-org/steps.py	2020-11-18 16:03:50 UTC (rev 269957)
+++ trunk/Tools/CISupport/build-webkit-org/steps.py	2020-11-18 16:05:17 UTC (rev 269958)
@@ -734,8 +734,13 @@
 
 
 class RunPythonTests(TestWithFailureCount):
+    test_summary_re = re.compile(r'^FAILED \((?P<counts>[^)]+)\)')  # e.g.: FAILED (failures=2, errors=1)
 
     def start(self):
+        if USE_BUILDBOT_VERSION2:
+            self.log_observer = ParseByLineLogObserver(self.parseOutputLine)
+            self.addLogObserver('stdio', self.log_observer)
+            self.failedTestCount = 0
         platform = self.getProperty('platform')
         # Python tests are flaky on the GTK builders, running them serially
         # helps and does not significantly prolong the cycle time.
@@ -747,7 +752,15 @@
             self.setCommand(self.command + ['--child-processes', '1'])
         return shell.Test.start(self)
 
+    def parseOutputLine(self, line):
+        match = self.test_summary_re.match(line)
+        if match:
+            self.failedTestCount = sum(int(component.split('=')[1]) for component in match.group('counts').split(', '))
+
     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: FAILED (failures=2, errors=1)
         regex = re.compile(r'^FAILED \((?P<counts>[^)]+)\)')

Modified: trunk/Tools/ChangeLog (269957 => 269958)


--- trunk/Tools/ChangeLog	2020-11-18 16:03:50 UTC (rev 269957)
+++ trunk/Tools/ChangeLog	2020-11-18 16:05:17 UTC (rev 269958)
@@ -1,3 +1,16 @@
+2020-11-18  Aakash Jain  <[email protected]>
+
+        [build.webkit.org] Update RunPythonTests step for new buildbot
+        https://bugs.webkit.org/show_bug.cgi?id=219082
+
+        Reviewed by Jonathan Bedard.
+
+        * CISupport/build-webkit-org/steps.py:
+        (RunPythonTests):
+        (RunPythonTests.start): Initialized log observer.
+        (RunPythonTests.parseOutputLine): Parse each log line as they come.
+        (RunPythonTests.countFailures): Updated to return failedTestCount.
+
 2020-11-18  Michael Catanzaro  <[email protected]>
 
         [WPE][GTK] Update Outlook user agent quirk
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to