WebKit Bugzilla
Attachment 368578 Details for
Bug 197423
: [ews-build] Parse and display bindings test failures
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-197423-20190430135613.patch (text/plain), 4.34 KB, created by
Aakash Jain
on 2019-04-30 10:56:13 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Aakash Jain
Created:
2019-04-30 10:56:13 PDT
Size:
4.34 KB
patch
obsolete
>Index: Tools/ChangeLog >=================================================================== >--- Tools/ChangeLog (revision 244782) >+++ Tools/ChangeLog (working copy) >@@ -1,3 +1,17 @@ >+2019-04-30 Aakash Jain <aakash_jain@apple.com> >+ >+ [ews-build] Parse and display bindings test failures >+ https://bugs.webkit.org/show_bug.cgi?id=197423 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * BuildSlaveSupport/ews-build/steps.py: >+ (RunBindingsTests.__init__): Set timeout of 5 minutes. >+ (RunBindingsTests.start): Initialize log_observer for json output. >+ (RunBindingsTests.getResultSummary): Update step and build summary based on bindings test results. >+ (RunBindingsTests._addToLog): Method to add message to log. >+ * BuildSlaveSupport/ews-build/steps_unittest.py: Updated unit-test accordingly. >+ > 2019-04-30 Pablo Saavedra <psaavedra@igalia.com> > > Unreviewed. Add myself as a committer. >Index: Tools/BuildSlaveSupport/ews-build/steps.py >=================================================================== >--- Tools/BuildSlaveSupport/ews-build/steps.py (revision 244778) >+++ Tools/BuildSlaveSupport/ews-build/steps.py (working copy) >@@ -467,6 +467,45 @@ class RunBindingsTests(shell.ShellComman > logfiles = {'json': jsonFileName} > command = ['Tools/Scripts/run-bindings-tests', '--json-output={0}'.format(jsonFileName)] > >+ def __init__(self, **kwargs): >+ super(RunBindingsTests, self).__init__(timeout=5 * 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 bindings 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(RunBindingsTests, self).getResultSummary() >+ >+ failures = webkitpy_results.get('failures') >+ if not failures: >+ return super(RunBindingsTests, self).getResultSummary() >+ pluralSuffix = 's' if len(failures) > 1 else '' >+ failures_string = ', '.join([failure.replace('(JS) ', '') for failure in failures]) >+ message = 'Found {} Binding 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) >+ > > class RunWebKitPerlTests(shell.ShellCommand): > name = 'webkitperl-tests' >Index: Tools/BuildSlaveSupport/ews-build/steps_unittest.py >=================================================================== >--- Tools/BuildSlaveSupport/ews-build/steps_unittest.py (revision 244778) >+++ Tools/BuildSlaveSupport/ews-build/steps_unittest.py (working copy) >@@ -294,18 +294,20 @@ class TestRunBindingsTests(BuildStepMixi > self.setupStep(RunBindingsTests()) > self.expectRemoteCommands( > ExpectShell(workdir='wkdir', >+ timeout=300, > command=['Tools/Scripts/run-bindings-tests', '--json-output={0}'.format(self.jsonFileName)], > logfiles={'json': self.jsonFileName}, > ) > + 0, > ) >- self.expectOutcome(result=SUCCESS, state_string='bindings-tests') >+ self.expectOutcome(result=SUCCESS, state_string='Passed bindings tests') > return self.runStep() > > def test_failure(self): > self.setupStep(RunBindingsTests()) > self.expectRemoteCommands( > ExpectShell(workdir='wkdir', >+ timeout=300, > command=['Tools/Scripts/run-bindings-tests', '--json-output={0}'.format(self.jsonFileName)], > logfiles={'json': self.jsonFileName}, > )
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 197423
: 368578