Diff
Modified: trunk/Tools/BuildSlaveSupport/ews-build/factories.py (254546 => 254547)
--- trunk/Tools/BuildSlaveSupport/ews-build/factories.py 2020-01-15 01:11:13 UTC (rev 254546)
+++ trunk/Tools/BuildSlaveSupport/ews-build/factories.py 2020-01-15 01:32:39 UTC (rev 254547)
@@ -29,7 +29,7 @@
DownloadBuiltProduct, ExtractBuiltProduct, InstallGtkDependencies, InstallWpeDependencies, KillOldProcesses,
PrintConfiguration, RunAPITests, RunBindingsTests, RunBuildWebKitOrgUnitTests, RunEWSBuildbotCheckConfig, RunEWSUnitTests,
RunJavaScriptCoreTests, RunWebKit1Tests, RunWebKitPerlTests,
- RunWebKitPyTests, RunWebKitTests, UpdateWorkingDirectory, ValidatePatch)
+ RunWebKitPyPython2Tests, RunWebKitPyPython3Tests, RunWebKitTests, UpdateWorkingDirectory, ValidatePatch)
class Factory(factory.BuildFactory):
@@ -87,7 +87,8 @@
class WebKitPyFactory(Factory):
def __init__(self, platform, configuration=None, architectures=None, additionalArguments=None, **kwargs):
Factory.__init__(self, platform=platform, configuration=configuration, architectures=architectures, buildOnly=False, additionalArgument=additionalArguments, checkRelevance=True)
- self.addStep(RunWebKitPyTests())
+ self.addStep(RunWebKitPyPython2Tests())
+ self.addStep(RunWebKitPyPython3Tests())
class BuildFactory(Factory):
Modified: trunk/Tools/BuildSlaveSupport/ews-build/factories_unittest.py (254546 => 254547)
--- trunk/Tools/BuildSlaveSupport/ews-build/factories_unittest.py 2020-01-15 01:11:13 UTC (rev 254546)
+++ trunk/Tools/BuildSlaveSupport/ews-build/factories_unittest.py 2020-01-15 01:32:39 UTC (rev 254547)
@@ -134,7 +134,8 @@
_BuildStepFactory(steps.CheckOutSource),
_BuildStepFactory(steps.CheckOutSpecificRevision),
_BuildStepFactory(steps.ApplyPatch),
- _BuildStepFactory(steps.RunWebKitPyTests),
+ _BuildStepFactory(steps.RunWebKitPyPython2Tests),
+ _BuildStepFactory(steps.RunWebKitPyPython3Tests),
])
def test_services_factory(self):
Modified: trunk/Tools/BuildSlaveSupport/ews-build/steps.py (254546 => 254547)
--- trunk/Tools/BuildSlaveSupport/ews-build/steps.py 2020-01-15 01:11:13 UTC (rev 254546)
+++ trunk/Tools/BuildSlaveSupport/ews-build/steps.py 2020-01-15 01:32:39 UTC (rev 254547)
@@ -693,17 +693,13 @@
return {u'step': u'Failed buildbot checkconfig'}
-class RunWebKitPyTests(shell.ShellCommand):
- name = 'webkitpy-tests'
- description = ['webkitpy-tests running']
+class WebKitPyTest(shell.ShellCommand):
+ language = 'python'
descriptionDone = ['webkitpy-tests']
flunkOnFailure = True
- jsonFileName = 'webkitpy_test_results.json'
- logfiles = {'json': jsonFileName}
- command = ['python', 'Tools/Scripts/test-webkitpy', '--json-output={0}'.format(jsonFileName)]
def __init__(self, **kwargs):
- super(RunWebKitPyTests, self).__init__(timeout=2 * 60, logEnviron=False, **kwargs)
+ super(WebKitPyTest, self).__init__(timeout=2 * 60, logEnviron=False, **kwargs)
def start(self):
self.log_observer = logobserver.BufferLogObserver()
@@ -712,8 +708,7 @@
def getResultSummary(self):
if self.results == SUCCESS:
- message = 'Passed webkitpy tests'
- self.build.buildFinished([message], SUCCESS)
+ message = 'Passed webkitpy {} tests'.format(self.language)
return {u'step': unicode(message)}
logLines = self.log_observer.getStdout()
@@ -722,15 +717,14 @@
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()
+ return super(WebKitPyTest, self).getResultSummary()
failures = webkitpy_results.get('failures') + webkitpy_results.get('errors')
if not failures:
- return super(RunWebKitPyTests, self).getResultSummary()
+ return super(WebKitPyTest, 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
@@ -742,6 +736,24 @@
log.addStdout(message)
+class RunWebKitPyPython2Tests(WebKitPyTest):
+ language = 'python2'
+ name = 'webkitpy-tests-{}'.format(language)
+ description = ['webkitpy-tests running ({})'.format(language)]
+ jsonFileName = 'webkitpy_test_{}_results.json'.format(language)
+ logfiles = {'json': jsonFileName}
+ command = ['python', 'Tools/Scripts/test-webkitpy', '--json-output={0}'.format(jsonFileName)]
+
+
+class RunWebKitPyPython3Tests(WebKitPyTest):
+ language = 'python3'
+ name = 'webkitpy-tests-{}'.format(language)
+ description = ['webkitpy-tests running ({})'.format(language)]
+ jsonFileName = 'webkitpy_test_{}_results.json'.format(language)
+ logfiles = {'json': jsonFileName}
+ command = ['python3', 'Tools/Scripts/test-webkitpy', '--json-output={0}'.format(jsonFileName)]
+
+
class InstallGtkDependencies(shell.ShellCommand):
name = 'jhbuild'
description = ['updating gtk dependencies']
Modified: trunk/Tools/BuildSlaveSupport/ews-build/steps_unittest.py (254546 => 254547)
--- trunk/Tools/BuildSlaveSupport/ews-build/steps_unittest.py 2020-01-15 01:11:13 UTC (rev 254546)
+++ trunk/Tools/BuildSlaveSupport/ews-build/steps_unittest.py 2020-01-15 01:32:39 UTC (rev 254547)
@@ -40,7 +40,7 @@
DownloadBuiltProduct, DownloadBuiltProductFromMaster, ExtractBuiltProduct, ExtractTestResults, InstallGtkDependencies, InstallWpeDependencies, KillOldProcesses,
PrintConfiguration, ReRunAPITests, ReRunJavaScriptCoreTests, ReRunWebKitPerlTests, ReRunWebKitTests, RunAPITests, RunAPITestsWithoutPatch,
RunBindingsTests, RunBuildWebKitOrgUnitTests, RunEWSBuildbotCheckConfig, RunEWSUnitTests, RunJavaScriptCoreTests, RunJSCTestsWithoutPatch, RunWebKit1Tests,
- RunWebKitPerlTests, RunWebKitPyTests, RunWebKitTests, RunWebKitTestsWithoutPatch, TestWithFailureCount, Trigger, TransferToS3, UnApplyPatchIfRequired,
+ RunWebKitPerlTests, RunWebKitPyPython2Tests, RunWebKitPyPython3Tests, RunWebKitTests, RunWebKitTestsWithoutPatch, TestWithFailureCount, Trigger, TransferToS3, UnApplyPatchIfRequired,
UpdateWorkingDirectory, UploadBuiltProduct, UploadTestResults, ValidatePatch)
# Workaround for https://github.com/buildbot/buildbot/issues/4669
@@ -419,10 +419,10 @@
self.setupStep(ReRunWebKitPerlTests())
-class TestWebKitPyTests(BuildStepMixinAdditions, unittest.TestCase):
+class TestWebKitPyPython2Tests(BuildStepMixinAdditions, unittest.TestCase):
def setUp(self):
self.longMessage = True
- self.jsonFileName = 'webkitpy_test_results.json'
+ self.jsonFileName = 'webkitpy_test_python2_results.json'
return self.setUpBuildStep()
def tearDown(self):
@@ -429,7 +429,7 @@
return self.tearDownBuildStep()
def test_success(self):
- self.setupStep(RunWebKitPyTests())
+ self.setupStep(RunWebKitPyPython2Tests())
self.expectRemoteCommands(
ExpectShell(workdir='wkdir',
logEnviron=False,
@@ -439,11 +439,11 @@
)
+ 0,
)
- self.expectOutcome(result=SUCCESS, state_string='Passed webkitpy tests')
+ self.expectOutcome(result=SUCCESS, state_string='Passed webkitpy python2 tests')
return self.runStep()
def test_failure(self):
- self.setupStep(RunWebKitPyTests())
+ self.setupStep(RunWebKitPyPython2Tests())
self.expectRemoteCommands(
ExpectShell(workdir='wkdir',
logEnviron=False,
@@ -459,6 +459,46 @@
return self.runStep()
+class TestWebKitPyPython3Tests(BuildStepMixinAdditions, unittest.TestCase):
+ def setUp(self):
+ self.longMessage = True
+ self.jsonFileName = 'webkitpy_test_python3_results.json'
+ return self.setUpBuildStep()
+
+ def tearDown(self):
+ return self.tearDownBuildStep()
+
+ def test_success(self):
+ self.setupStep(RunWebKitPyPython3Tests())
+ self.expectRemoteCommands(
+ ExpectShell(workdir='wkdir',
+ logEnviron=False,
+ command=['python3', 'Tools/Scripts/test-webkitpy', '--json-output={0}'.format(self.jsonFileName)],
+ logfiles={'json': self.jsonFileName},
+ timeout=120,
+ )
+ + 0,
+ )
+ self.expectOutcome(result=SUCCESS, state_string='Passed webkitpy python3 tests')
+ return self.runStep()
+
+ def test_failure(self):
+ self.setupStep(RunWebKitPyPython3Tests())
+ self.expectRemoteCommands(
+ ExpectShell(workdir='wkdir',
+ logEnviron=False,
+ command=['python3', 'Tools/Scripts/test-webkitpy', '--json-output={0}'.format(self.jsonFileName)],
+ logfiles={'json': self.jsonFileName},
+ timeout=120,
+ )
+ + ExpectShell.log('stdio', stdout='''Ran 1744 tests in 5.913s
+FAILED (failures=1, errors=0)''')
+ + 2,
+ )
+ self.expectOutcome(result=FAILURE, state_string='webkitpy-tests (failure)')
+ return self.runStep()
+
+
class TestRunEWSBuildbotCheckConfig(BuildStepMixinAdditions, unittest.TestCase):
def setUp(self):
self.longMessage = True
Modified: trunk/Tools/ChangeLog (254546 => 254547)
--- trunk/Tools/ChangeLog 2020-01-15 01:11:13 UTC (rev 254546)
+++ trunk/Tools/ChangeLog 2020-01-15 01:32:39 UTC (rev 254547)
@@ -1,3 +1,24 @@
+2020-01-14 Jonathan Bedard <[email protected]>
+
+ EWS: Run webkitpy tests with Python 2 and 3
+ https://bugs.webkit.org/show_bug.cgi?id=206113
+
+ Reviewed by Aakash Jain.
+
+ * BuildSlaveSupport/ews-build/factories.py:
+ (WebKitPyFactory.__init__): Run webkitpy tests in Python 2 and Python 3.
+ * BuildSlaveSupport/ews-build/factories_unittest.py:
+ (TestTestsFactory.test_webkitpy_factory):
+ * BuildSlaveSupport/ews-build/steps.py:
+ (WebKitPyTest): Renamed from RunWebKitPyTests.
+ (RunWebKitPyPython2Tests):
+ (RunWebKitPyPython3Tests):
+ (RunWebKitPyTests): Renamed to WebKitPyTest.
+ * BuildSlaveSupport/ews-build/steps_unittest.py:
+ (TestWebKitPyPython2Tests): Moved from TestWebKitPyTests.
+ (TestWebKitPyTests): Moved to TestWebKitPyPython2Tests.
+ (TestWebKitPyPython3Tests): Copied from TestWebKitPyPython2Tests.
+
2020-01-14 Aakash Jain <[email protected]>
[EWS] Status bubble tooltip might display success message sometimes on a failed build