Skip to content

Commit

Permalink
[ews-build.webkit.org] Use new-style shell commands for services testing
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=249029
rdar://103186946

Reviewed by Aakash Jain.

* Tools/CISupport/ews-build/steps.py:
(RunWebKitPerlTests): Make step ShellCommandNewStyle.
(RunBuildWebKitOrgUnitTests): Ditto.
(RunEWSUnitTests): Ditto.
(RunResultsdbpyTests): Ditto.
(WebKitPyTest): Ditto.
(WebKitPyTest.run): Renmaed from WebKitPyTest.start.
(RunBuildWebKitOrgUnitTests.start): Deleted.
(WebKitPyTest.start): Renamed to WebKitPyTest.run.

Canonical link: https://commits.webkit.org/257767@main
  • Loading branch information
JonWBedard committed Dec 13, 2022
1 parent d289007 commit 1a50a2d
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions Tools/CISupport/ews-build/steps.py
Expand Up @@ -2278,7 +2278,7 @@ def getResultSummary(self):
return {'step': message}


class RunWebKitPerlTests(shell.ShellCommand):
class RunWebKitPerlTests(shell.ShellCommandNewStyle):
name = 'webkitperl-tests'
description = ['webkitperl-tests running']
descriptionDone = ['webkitperl-tests']
Expand Down Expand Up @@ -2312,24 +2312,21 @@ def evaluateCommand(self, cmd):
return shell.ShellCommand.evaluateCommand(self, cmd)


class RunBuildWebKitOrgUnitTests(shell.ShellCommand):
class RunBuildWebKitOrgUnitTests(shell.ShellCommandNewStyle):
name = 'build-webkit-org-unit-tests'
description = ['build-webkit-unit-tests running']
command = ['python3', 'runUnittests.py', 'build-webkit-org']

def __init__(self, **kwargs):
super(RunBuildWebKitOrgUnitTests, self).__init__(workdir='build/Tools/CISupport', timeout=2 * 60, logEnviron=False, **kwargs)

def start(self):
return shell.ShellCommand.start(self)

def getResultSummary(self):
if self.results == SUCCESS:
return {'step': 'Passed build.webkit.org unit tests'}
return {'step': 'Failed build.webkit.org unit tests'}


class RunEWSUnitTests(shell.ShellCommand):
class RunEWSUnitTests(shell.ShellCommandNewStyle):
name = 'ews-unit-tests'
description = ['ews-unit-tests running']
command = ['python3', 'runUnittests.py', 'ews-build']
Expand Down Expand Up @@ -2373,7 +2370,7 @@ class RunBuildbotCheckConfigForBuildWebKit(RunBuildbotCheckConfig):
directory = 'build/Tools/CISupport/build-webkit-org'


class RunResultsdbpyTests(shell.ShellCommand):
class RunResultsdbpyTests(shell.ShellCommandNewStyle):
name = 'resultsdbpy-unit-tests'
description = ['resultsdbpy-unit-tests running']
command = [
Expand All @@ -2393,7 +2390,7 @@ def getResultSummary(self):
return {'step': 'Failed resultsdbpy unit tests'}


class WebKitPyTest(shell.ShellCommand, AddToLogMixin):
class WebKitPyTest(shell.ShellCommandNewStyle, AddToLogMixin):
language = 'python'
descriptionDone = ['webkitpy-tests']
flunkOnFailure = True
Expand All @@ -2402,10 +2399,10 @@ class WebKitPyTest(shell.ShellCommand, AddToLogMixin):
def __init__(self, **kwargs):
super(WebKitPyTest, self).__init__(timeout=2 * 60, logEnviron=False, **kwargs)

def start(self):
def run(self):
self.log_observer = logobserver.BufferLogObserver()
self.addLogObserver('json', self.log_observer)
return shell.ShellCommand.start(self)
return super(WebKitPyTest, self).run()

def setBuildSummary(self, build_summary):
previous_build_summary = self.getProperty('build_summary', '')
Expand Down

0 comments on commit 1a50a2d

Please sign in to comment.