Title: [273403] trunk/Tools
Revision
273403
Author
aakash_j...@apple.com
Date
2021-02-24 09:25:15 -0800 (Wed, 24 Feb 2021)

Log Message

[ews] Make unit-test compatible with latest buildbot
https://bugs.webkit.org/show_bug.cgi?id=222359

Reviewed by Jonathan Bedard.

* CISupport/ews-build/steps_unittest.py:
(BuildStepMixinAdditions):
(BuildStepMixinAdditions.setUpBuildStep): Invoke setUpTestReactor.

Modified Paths

Diff

Modified: trunk/Tools/CISupport/ews-build/steps_unittest.py (273402 => 273403)


--- trunk/Tools/CISupport/ews-build/steps_unittest.py	2021-02-24 17:10:49 UTC (rev 273402)
+++ trunk/Tools/CISupport/ews-build/steps_unittest.py	2021-02-24 17:25:15 UTC (rev 273403)
@@ -38,6 +38,12 @@
 from twisted.python import failure, log
 from twisted.trial import unittest
 
+if sys.version_info > (3, 0):
+    from buildbot.test.util.misc import TestReactorMixin
+else:
+    TestReactorMixin = type('TestReactorMixin', (object,), {})
+    TestReactorMixin.setUpTestReactor = lambda self: None
+
 from steps import (AnalyzeAPITestsResults, AnalyzeCompileWebKitResults, AnalyzeJSCTestsResults,
                    AnalyzeLayoutTestsResults, ApplyPatch, ApplyWatchList, ArchiveBuiltProduct, ArchiveTestResults,
                    CheckOutSource, CheckOutSpecificRevision, CheckPatchRelevance, CheckPatchStatusOnEWSQueues, CheckStyle,
@@ -95,10 +101,11 @@
         return 'ExpectMasterShellCommand({0})'.format(repr(self.args))
 
 
-class BuildStepMixinAdditions(BuildStepMixin):
+class BuildStepMixinAdditions(BuildStepMixin, TestReactorMixin):
     def setUpBuildStep(self):
         self.patch(reactor, 'spawnProcess', lambda *args, **kwargs: self._checkSpawnProcess(*args, **kwargs))
         self._expected_local_commands = []
+        self.setUpTestReactor()
 
         self._temp_directory = tempfile.mkdtemp()
         os.chdir(self._temp_directory)

Modified: trunk/Tools/ChangeLog (273402 => 273403)


--- trunk/Tools/ChangeLog	2021-02-24 17:10:49 UTC (rev 273402)
+++ trunk/Tools/ChangeLog	2021-02-24 17:25:15 UTC (rev 273403)
@@ -1,3 +1,14 @@
+2021-02-24  Aakash Jain  <aakash_j...@apple.com>
+
+        [ews] Make unit-test compatible with latest buildbot
+        https://bugs.webkit.org/show_bug.cgi?id=222359
+
+        Reviewed by Jonathan Bedard.
+
+        * CISupport/ews-build/steps_unittest.py:
+        (BuildStepMixinAdditions):
+        (BuildStepMixinAdditions.setUpBuildStep): Invoke setUpTestReactor.
+
 2021-02-24  Don Olmstead  <don.olmst...@sony.com>
 
         Only import Python flatpak module on Linux
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to