WebKit Bugzilla
Attachment 368516 Details for
Bug 197395
: [ews-build] Parse and display webkitpy failures
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-197395-20190429195745.patch (text/plain), 3.55 KB, created by
Aakash Jain
on 2019-04-29 16:57:46 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Aakash Jain
Created:
2019-04-29 16:57:46 PDT
Size:
3.55 KB
patch
obsolete
>Index: Tools/ChangeLog >=================================================================== >--- Tools/ChangeLog (revision 244761) >+++ Tools/ChangeLog (working copy) >@@ -1,3 +1,16 @@ >+2019-04-29 Aakash Jain <aakash_jain@apple.com> >+ >+ [ews-build] Parse and display webkitpy failures >+ https://bugs.webkit.org/show_bug.cgi?id=197395 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * BuildSlaveSupport/ews-build/steps.py: >+ (RunWebKitPyTests.start): Initialize log_observer for json output. >+ (RunWebKitPyTests.getResultSummary): Update step and build summary based on webkitpy results. >+ (RunWebKitPyTests._addToLog): Method to add message to log. >+ * BuildSlaveSupport/ews-build/steps_unittest.py: Updated unit-test accordingly. >+ > 2019-04-29 Alex Christensen <achristensen@webkit.org> > > <rdar://problem/50299396> Fix internal High Sierra build >Index: Tools/BuildSlaveSupport/ews-build/steps.py >=================================================================== >--- Tools/BuildSlaveSupport/ews-build/steps.py (revision 244761) >+++ Tools/BuildSlaveSupport/ews-build/steps.py (working copy) >@@ -491,6 +491,42 @@ class RunWebKitPyTests(shell.ShellComman > def __init__(self, **kwargs): > super(RunWebKitPyTests, self).__init__(timeout=2 * 60, **kwargs) > >+ def start(self): >+ self.log_observer = logobserver.BufferLogObserver() >+ self.addLogObserver('json', self.log_observer) >+ return shell.ShellCommand.start(self) >+ >+ def getResultSummary(self): >+ if self.results == SUCCESS: >+ message = 'Passed webkitpy tests' >+ self.build.buildFinished([message], SUCCESS) >+ return {u'step': unicode(message)} >+ >+ logLines = self.log_observer.getStdout() >+ json_text = ''.join([line for line in logLines.splitlines()]) >+ try: >+ webkitpy_results = json.loads(json_text) >+ except Exception as ex: >+ self._addToLog('stderr', 'ERROR: unable to parse data, exception: {}'.format(ex)) >+ return super(RunWebKitPyTests, self).getResultSummary() >+ >+ failures = webkitpy_results.get('failures') + webkitpy_results.get('errors') >+ if not failures: >+ return super(RunWebKitPyTests, self).getResultSummary() >+ pluralSuffix = 's' if len(failures) > 1 else '' >+ failures_string = ', '.join([failure.get('name').replace('webkitpy.', '') for failure in failures]) >+ message = 'Found {} WebKitPy test failure{}: {}'.format(len(failures), pluralSuffix, failures_string) >+ self.build.buildFinished([message], FAILURE) >+ return {u'step': unicode(message)} >+ >+ @defer.inlineCallbacks >+ def _addToLog(self, logName, message): >+ try: >+ log = self.getLog(logName) >+ except KeyError: >+ log = yield self.addLog(logName) >+ log.addStdout(message) >+ > > def appendCustomBuildFlags(step, platform, fullPlatform): > # FIXME: Make a common 'supported platforms' list. >Index: Tools/BuildSlaveSupport/ews-build/steps_unittest.py >=================================================================== >--- Tools/BuildSlaveSupport/ews-build/steps_unittest.py (revision 244761) >+++ Tools/BuildSlaveSupport/ews-build/steps_unittest.py (working copy) >@@ -372,7 +372,7 @@ class TestWebKitPyTests(BuildStepMixinAd > ) > + 0, > ) >- self.expectOutcome(result=SUCCESS, state_string='webkitpy-tests') >+ self.expectOutcome(result=SUCCESS, state_string='Passed webkitpy tests') > return self.runStep() > > def test_failure(self):
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 197395
: 368516