Title: [239783] trunk/Tools
- Revision
- 239783
- Author
- aakash_j...@apple.com
- Date
- 2019-01-09 13:59:04 -0800 (Wed, 09 Jan 2019)
Log Message
[ews-build] Parse and display number of style failures
https://bugs.webkit.org/show_bug.cgi?id=193280
Reviewed by Lucas Forschler.
* BuildSlaveSupport/ews-build/steps.py:
(CheckStyle): Use TestWithFailureCount as base class.
(CheckStyle.countFailures): Count the number of style failures.
Modified Paths
Diff
Modified: trunk/Tools/BuildSlaveSupport/ews-build/steps.py (239782 => 239783)
--- trunk/Tools/BuildSlaveSupport/ews-build/steps.py 2019-01-09 21:56:53 UTC (rev 239782)
+++ trunk/Tools/BuildSlaveSupport/ews-build/steps.py 2019-01-09 21:59:04 UTC (rev 239783)
@@ -363,14 +363,6 @@
return not self.doStepIf(step)
-class CheckStyle(shell.ShellCommand):
- name = 'check-webkit-style'
- description = ['check-webkit-style running']
- descriptionDone = ['check-webkit-style']
- flunkOnFailure = True
- command = ['Tools/Scripts/check-webkit-style']
-
-
class TestWithFailureCount(shell.Test):
failedTestsFormatString = "%d test%s failed"
failedTestCount = 0
@@ -409,6 +401,23 @@
return {u'step': status}
+class CheckStyle(TestWithFailureCount):
+ name = 'check-webkit-style'
+ description = ['check-webkit-style running']
+ descriptionDone = ['check-webkit-style']
+ flunkOnFailure = True
+ failedTestsFormatString = '%d style error%s'
+ command = ['Tools/Scripts/check-webkit-style']
+
+ def countFailures(self, cmd):
+ log_text = self.log_observer.getStdout() + self.log_observer.getStderr()
+
+ match = re.search(r'Total errors found: (?P<errors>\d+) in (?P<files>\d+) files', log_text)
+ if not match:
+ return 0
+ return int(match.group('errors'))
+
+
class RunBindingsTests(shell.ShellCommand):
name = 'bindings-tests'
description = ['bindings-tests running']
Modified: trunk/Tools/BuildSlaveSupport/ews-build/steps_unittest.py (239782 => 239783)
--- trunk/Tools/BuildSlaveSupport/ews-build/steps_unittest.py 2019-01-09 21:56:53 UTC (rev 239782)
+++ trunk/Tools/BuildSlaveSupport/ews-build/steps_unittest.py 2019-01-09 21:59:04 UTC (rev 239783)
@@ -234,7 +234,7 @@
Total errors found: 8 in 48 files''')
+ 2,
)
- self.expectOutcome(result=FAILURE, state_string='check-webkit-style (failure)')
+ self.expectOutcome(result=FAILURE, state_string='8 style errors (failure)')
return self.runStep()
def test_failures_no_style_issues(self):
Modified: trunk/Tools/ChangeLog (239782 => 239783)
--- trunk/Tools/ChangeLog 2019-01-09 21:56:53 UTC (rev 239782)
+++ trunk/Tools/ChangeLog 2019-01-09 21:59:04 UTC (rev 239783)
@@ -1,5 +1,16 @@
2019-01-09 Aakash Jain <aakash_j...@apple.com>
+ [ews-build] Parse and display number of style failures
+ https://bugs.webkit.org/show_bug.cgi?id=193280
+
+ Reviewed by Lucas Forschler.
+
+ * BuildSlaveSupport/ews-build/steps.py:
+ (CheckStyle): Use TestWithFailureCount as base class.
+ (CheckStyle.countFailures): Count the number of style failures.
+
+2019-01-09 Aakash Jain <aakash_j...@apple.com>
+
[ews-build] use patch_id instead of ewspatchid
https://bugs.webkit.org/show_bug.cgi?id=193235
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes