Changeset 277395 in webkit
- Timestamp:
- May 12, 2021, 3:07:49 PM (5 years ago)
- Location:
- trunk/Tools
- Files:
-
- 3 edited
-
CISupport/build-webkit-org/steps.py (modified) (2 diffs)
-
CISupport/build-webkit-org/steps_unittest.py (modified) (1 diff)
-
ChangeLog (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/CISupport/build-webkit-org/steps.py
r277043 r277395 22 22 23 23 from buildbot.process import buildstep, factory, logobserver, properties 24 from buildbot.process.results import Results, SUCCESS, FAILURE, WARNINGS, SKIPPED, EXCEPTION 24 from buildbot.process.results import Results, SUCCESS, FAILURE, WARNINGS, SKIPPED, EXCEPTION, RETRY 25 25 from buildbot.steps import master, shell, transfer, trigger 26 26 from buildbot.steps.source.svn import SVN … … 131 131 132 132 class CheckOutSource(SVN, object): 133 name = 'clean-and-update-working-directory' 134 haltOnFailure = False 135 133 136 def __init__(self, **kwargs): 134 137 kwargs['repourl'] = 'https://svn.webkit.org/repository/webkit/trunk' 135 138 kwargs['mode'] = 'incremental' 139 kwargs['logEnviron'] = False 136 140 super(CheckOutSource, self).__init__(**kwargs) 141 142 def getResultSummary(self): 143 if self.results == FAILURE: 144 self.build.addStepsAfterCurrentStep([SVNCleanup()]) 145 146 if self.results != SUCCESS: 147 return {'step': 'Failed to updated working directory'} 148 else: 149 return {'step': 'Cleaned and updated working directory'} 150 151 152 class SVNCleanup(shell.ShellCommand): 153 name = 'svn-cleanup' 154 command = ['svn', 'cleanup'] 155 descriptionDone = ['Run svn cleanup'] 156 157 def __init__(self, **kwargs): 158 super(SVNCleanup, self).__init__(timeout=10 * 60, logEnviron=False, **kwargs) 159 160 def evaluateCommand(self, cmd): 161 self.build.buildFinished(['svn issue, retrying build'], RETRY) 162 return super(SVNCleanup, self).evaluateCommand(cmd) 137 163 138 164 -
trunk/Tools/CISupport/build-webkit-org/steps_unittest.py
r277043 r277395 992 992 self.expectOutcome(result=FAILURE, state_string='failed (1) (failure)') 993 993 return self.runStep() 994 995 996 class TestSVNCleanup(BuildStepMixinAdditions, unittest.TestCase): 997 def setUp(self): 998 self.longMessage = True 999 return self.setUpBuildStep() 1000 1001 def tearDown(self): 1002 return self.tearDownBuildStep() 1003 1004 def test_success(self): 1005 self.setupStep(SVNCleanup()) 1006 self.expectRemoteCommands( 1007 ExpectShell( 1008 workdir='wkdir', 1009 timeout=600, 1010 logEnviron=False, 1011 command=['svn', 'cleanup'], 1012 ) + 0, 1013 ) 1014 self.expectOutcome(result=SUCCESS, state_string='Run svn cleanup') 1015 return self.runStep() 1016 1017 def test_failure(self): 1018 self.setupStep(SVNCleanup()) 1019 self.expectRemoteCommands( 1020 ExpectShell( 1021 workdir='wkdir', 1022 timeout=600, 1023 logEnviron=False, 1024 command=['svn', 'cleanup'], 1025 ) + 2 1026 + ExpectShell.log('stdio', stdout='Unexpected error.'), 1027 ) 1028 self.expectOutcome(result=FAILURE, state_string='Run svn cleanup (failure)') 1029 return self.runStep() -
trunk/Tools/ChangeLog
r277393 r277395 1 2021-05-12 Aakash Jain <aakash_jain@apple.com> 2 3 [build.webkit.org] Bots should automatically recover from svn checkout is already locked issue 4 https://bugs.webkit.org/show_bug.cgi?id=225717 5 6 Reviewed by Jonathan Bedard. 7 8 * CISupport/build-webkit-org/steps.py: 9 (CheckOutSource): Set haltOnFailure to False so that cleanup step can run. Also set the step name while we are at it. 10 (CheckOutSource.__init__): Also set logEnviron to False. 11 (CheckOutSource.getResultSummary): Run SVNCleanup step in case of failure. 12 (SVNCleanup): 13 (SVNCleanup.__init__): 14 (SVNCleanup.evaluateCommand): 15 * CISupport/build-webkit-org/steps_unittest.py: Added unit-tests for the new step. 16 1 17 2021-05-12 Chris Dumez <cdumez@apple.com> 2 18
Note:
See TracChangeset
for help on using the changeset viewer.