Title: [244551] trunk/Tools
- Revision
- 244551
- Author
- [email protected]
- Date
- 2019-04-23 11:02:55 -0700 (Tue, 23 Apr 2019)
Log Message
[ews-build] Add unit tests for UnApplyPatchIfRequired
https://bugs.webkit.org/show_bug.cgi?id=197197
Reviewed by Lucas Forschler.
* BuildSlaveSupport/ews-build/steps_unittest.py:
(TestUnApplyPatchIfRequired):
(TestUnApplyPatchIfRequired.test_success):
(TestUnApplyPatchIfRequired.test_failure):
(TestUnApplyPatchIfRequired.test_skip):
Modified Paths
Diff
Modified: trunk/Tools/BuildSlaveSupport/ews-build/steps_unittest.py (244550 => 244551)
--- trunk/Tools/BuildSlaveSupport/ews-build/steps_unittest.py 2019-04-23 17:58:21 UTC (rev 244550)
+++ trunk/Tools/BuildSlaveSupport/ews-build/steps_unittest.py 2019-04-23 18:02:55 UTC (rev 244551)
@@ -866,6 +866,48 @@
return self.runStep()
+class TestUnApplyPatchIfRequired(BuildStepMixinAdditions, unittest.TestCase):
+ def setUp(self):
+ self.longMessage = True
+ return self.setUpBuildStep()
+
+ def tearDown(self):
+ return self.tearDownBuildStep()
+
+ def test_success(self):
+ self.setupStep(UnApplyPatchIfRequired())
+ self.setProperty('patchFailedToBuild', True)
+ self.expectHidden(False)
+ self.expectRemoteCommands(
+ ExpectShell(workdir='wkdir',
+ command=['Tools/Scripts/clean-webkit'],
+ )
+ + 0,
+ )
+ self.expectOutcome(result=SUCCESS, state_string='Unapplied patch')
+ return self.runStep()
+
+ def test_failure(self):
+ self.setupStep(UnApplyPatchIfRequired())
+ self.setProperty('patchFailedToBuild', True)
+ self.expectHidden(False)
+ self.expectRemoteCommands(
+ ExpectShell(workdir='wkdir',
+ command=['Tools/Scripts/clean-webkit'],
+ )
+ + ExpectShell.log('stdio', stdout='Unexpected failure.')
+ + 2,
+ )
+ self.expectOutcome(result=FAILURE, state_string='Unapplied patch (failure)')
+ return self.runStep()
+
+ def test_skip(self):
+ self.setupStep(UnApplyPatchIfRequired())
+ self.expectHidden(True)
+ self.expectOutcome(result=SKIPPED, state_string='Unapplied patch (skipped)')
+ return self.runStep()
+
+
class TestArchiveBuiltProduct(BuildStepMixinAdditions, unittest.TestCase):
def setUp(self):
self.longMessage = True
Modified: trunk/Tools/ChangeLog (244550 => 244551)
--- trunk/Tools/ChangeLog 2019-04-23 17:58:21 UTC (rev 244550)
+++ trunk/Tools/ChangeLog 2019-04-23 18:02:55 UTC (rev 244551)
@@ -1,5 +1,18 @@
2019-04-23 Aakash Jain <[email protected]>
+ [ews-build] Add unit tests for UnApplyPatchIfRequired
+ https://bugs.webkit.org/show_bug.cgi?id=197197
+
+ Reviewed by Lucas Forschler.
+
+ * BuildSlaveSupport/ews-build/steps_unittest.py:
+ (TestUnApplyPatchIfRequired):
+ (TestUnApplyPatchIfRequired.test_success):
+ (TestUnApplyPatchIfRequired.test_failure):
+ (TestUnApplyPatchIfRequired.test_skip):
+
+2019-04-23 Aakash Jain <[email protected]>
+
[ews-build] Add unit tests for CleanWorkingDirectory
https://bugs.webkit.org/show_bug.cgi?id=197195
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes