Changeset 247364 in webkit
- Timestamp:
- Jul 11, 2019 2:12:39 PM (5 years ago)
- Location:
- trunk/Tools
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/BuildSlaveSupport/ews-build/steps.py
r247305 r247364 103 103 104 104 def getResultSummary(self): 105 if self.results == FAILURE: 106 self.build.addStepsAfterCurrentStep([CleanUpGitIndexLock()]) 107 105 108 if self.results != SUCCESS: 106 109 return {u'step': u'Failed to updated working directory'} 107 110 else: 108 111 return {u'step': u'Cleaned and updated working directory'} 112 113 114 class CleanUpGitIndexLock(shell.ShellCommand): 115 name = 'clean-git-index-lock' 116 command = ['rm', '-f', '.git/index.lock'] 117 descriptionDone = ['Deleted .git/index.lock'] 118 119 def __init__(self, **kwargs): 120 super(CleanUpGitIndexLock, self).__init__(timeout=2 * 60, logEnviron=False, **kwargs) 121 122 def evaluateCommand(self, cmd): 123 self.build.buildFinished(['Git issue, retrying build'], RETRY) 124 return super(CleanUpGitIndexLock, self).evaluateCommand(cmd) 109 125 110 126 -
trunk/Tools/BuildSlaveSupport/ews-build/steps_unittest.py
r247305 r247364 36 36 37 37 from steps import (AnalyzeAPITestsResults, AnalyzeCompileWebKitResults, ApplyPatch, ArchiveBuiltProduct, ArchiveTestResults, 38 CheckOutSource, CheckOutSpecificRevision, CheckPatchRelevance, CheckStyle, CleanBuild, Clean WorkingDirectory,38 CheckOutSource, CheckOutSpecificRevision, CheckPatchRelevance, CheckStyle, CleanBuild, CleanUpGitIndexLock, CleanWorkingDirectory, 39 39 CompileJSCOnly, CompileJSCOnlyToT, CompileWebKit, CompileWebKitToT, ConfigureBuild, 40 40 DownloadBuiltProduct, ExtractBuiltProduct, ExtractTestResults, InstallGtkDependencies, InstallWpeDependencies, KillOldProcesses, … … 476 476 ) 477 477 self.expectOutcome(result=FAILURE, state_string='Deleted WebKitBuild directory (failure)') 478 return self.runStep() 479 480 481 class TestCleanUpGitIndexLock(BuildStepMixinAdditions, unittest.TestCase): 482 def setUp(self): 483 self.longMessage = True 484 return self.setUpBuildStep() 485 486 def tearDown(self): 487 return self.tearDownBuildStep() 488 489 def test_success(self): 490 self.setupStep(CleanUpGitIndexLock()) 491 self.expectRemoteCommands( 492 ExpectShell(workdir='wkdir', 493 timeout=120, 494 logEnviron=False, 495 command=['rm', '-f', '.git/index.lock'], 496 ) 497 + 0, 498 ) 499 self.expectOutcome(result=SUCCESS, state_string='Deleted .git/index.lock') 500 return self.runStep() 501 502 def test_failure(self): 503 self.setupStep(CleanUpGitIndexLock()) 504 self.expectRemoteCommands( 505 ExpectShell(workdir='wkdir', 506 timeout=120, 507 logEnviron=False, 508 command=['rm', '-f', '.git/index.lock'], 509 ) 510 + ExpectShell.log('stdio', stdout='Unexpected error.') 511 + 1, 512 ) 513 self.expectOutcome(result=FAILURE, state_string='Deleted .git/index.lock (failure)') 478 514 return self.runStep() 479 515 -
trunk/Tools/ChangeLog
r247355 r247364 1 2019-07-11 Aakash Jain <aakash_jain@apple.com> 2 3 [ews-build] Add build step to clean up .git/index.lock file 4 https://bugs.webkit.org/show_bug.cgi?id=199722 5 6 Reviewed by Jonathan Bedard. 7 8 * BuildSlaveSupport/ews-build/steps.py: 9 (CheckOutSource.getResultSummary): Run CleanUpGitIndexLock step when CheckOutSource fails. 10 (CleanUpGitIndexLock.__init__): Configure timeout and logEnviron. 11 (CleanUpGitIndexLock.evaluateCommand): Always RETRY the build after this step is run. 12 * BuildSlaveSupport/ews-build/steps_unittest.py: Added unit-tests. 13 1 14 2019-07-11 Jonathan Bedard <jbedard@apple.com> 2 15
Note: See TracChangeset
for help on using the changeset viewer.